Skip to content

Commit

Permalink
Fix key started in value
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanhecl committed Dec 25, 2021
1 parent 10b6943 commit b1160fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions goini.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ func (t *TINIFile) processLine(line string, prevLine _TLine) _TLine {
if t.options.Debug {
fmt.Println("Start of key")
}
capturingKey = false
continue
}
if !ignoringComment {
Expand Down
2 changes: 1 addition & 1 deletion goini_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var testValues = []TestValue{
{String: "//not a comment"},
{StringArray: []string{"test", "test2"}},
}
var specialString = "it is a string with slash // no comment"
var specialString = "it is a string=with slash // no comment"

func TestCreateNewFile(t *testing.T) {
ini := New(&TOptions{Debug: true})
Expand Down
2 changes: 1 addition & 1 deletion test.ini
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[Test]0string=test1bool=12bool=false3byte=2554int=12345675int8=1236int16=123457int32=12345678908int64=12345678901234567899float32=1.234568e+0910float64=1.2345678901234568e+1811uint64=1234567890123456789012string="https://www.jonathanhecl.com/"13string="//not a comment"14stringarray=test,test2specialString="it is a string with slash // no comment"
[Test]0string=test1bool=12bool=false3byte=2554int=12345675int8=1236int16=123457int32=12345678908int64=12345678901234567899float32=1.234568e+0910float64=1.2345678901234568e+1811uint64=1234567890123456789012string="https://www.jonathanhecl.com/"13string="//not a comment"14stringarray=test,test2specialString="it is a string=with slash // no comment"
Expand Down

0 comments on commit b1160fd

Please sign in to comment.