This commit is contained in:
Felix Krause 2016-02-18 22:14:24 +01:00
parent b2707f99d7
commit bc9229d0c5
2 changed files with 12 additions and 1 deletions

View File

@ -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)

View File

@ -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())