mirror of https://github.com/status-im/NimYAML.git
Fixes #1
This commit is contained in:
parent
b2707f99d7
commit
bc9229d0c5
|
@ -686,6 +686,13 @@ template plainScalar(lexer: BaseLexer, content: var string,
|
|||
break outer
|
||||
of '#':
|
||||
break outer
|
||||
of flowIndicators:
|
||||
if context in [cBlockOut, cBlockIn, cBlockKey]:
|
||||
content.add(after)
|
||||
content.add(c2)
|
||||
break
|
||||
else:
|
||||
break outer
|
||||
else:
|
||||
content.add(after)
|
||||
content.add(c2)
|
||||
|
|
|
@ -260,3 +260,7 @@ suite "Parsing":
|
|||
scalarEvent("b"), scalarEvent("", yTagQuestionMark, 1.AnchorId),
|
||||
scalarEvent("", yTagQuestionMark, 2.AnchorId),
|
||||
scalarEvent("", yTagQuestionMark, 3.AnchorId), endMapEvent(), endDocEvent())
|
||||
test "Parsing: Whitespace before end of flow content":
|
||||
ensure("- [a, b, c ]", startDocEvent(), startSeqEvent(),
|
||||
startSeqEvent(), scalarEvent("a"), scalarEvent("b"),
|
||||
scalarEvent("c"), endSeqEvent(), endSeqEvent(), endDocEvent())
|
Loading…
Reference in New Issue