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)
|
||||
|
|
|
@ -259,4 +259,8 @@ suite "Parsing":
|
|||
scalarEvent("", yTagQuestionMark, 0.AnchorId), scalarEvent("a"),
|
||||
scalarEvent("b"), scalarEvent("", yTagQuestionMark, 1.AnchorId),
|
||||
scalarEvent("", yTagQuestionMark, 2.AnchorId),
|
||||
scalarEvent("", yTagQuestionMark, 3.AnchorId), endMapEvent(), endDocEvent())
|
||||
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