diff options
-rw-r--r-- | src/config/toml.nim | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/config/toml.nim b/src/config/toml.nim index 66f8335f..a4e13dea 100644 --- a/src/config/toml.nim +++ b/src/config/toml.nim @@ -159,13 +159,15 @@ proc consumeString(state: var TomlParser, first: char): if c == '\n' and not multiline: return state.err("newline in string") elif c == first: - if multiline and state.has(1): - let c2 = state.peek(0) - let c3 = state.peek(1) - if c2 == first and c3 == first: - discard state.consume() - discard state.consume() - break + if multiline: + if state.has(1): + let c2 = state.peek(0) + let c3 = state.peek(1) + if c2 == first and c3 == first: + discard state.consume() + discard state.consume() + break + res &= c else: break elif first == '"' and c == '\\': |