Skip to content

Commit da6a007

Browse files
committed
fix: add , as TERMINATING_CHAR for cases when a value is a JSON like object
1 parent 4b5e053 commit da6a007

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

configmanager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
const (
15-
TERMINATING_CHAR string = `[^\'\"\s\n\\]`
15+
TERMINATING_CHAR string = `[^\'\"\s\n\\\,]`
1616
)
1717

1818
type ConfigManager struct{}

configmanager_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ key = "val1"
119119
input: `
120120
// TOML
121121
[[somestuff]]
122-
key = FOO#/test
122+
key = FOO#/test,FOO#/test-FOO#/test
123123
key2 = FOO#/test
124124
key3 = FOO#/test
125125
key4 = FOO#/test
@@ -128,7 +128,7 @@ key4 = FOO#/test
128128
expect: `
129129
// TOML
130130
[[somestuff]]
131-
key = val1
131+
key = val1,val1-val1
132132
key2 = val1
133133
key3 = val1
134134
key4 = val1

0 commit comments

Comments
 (0)