(hopefully) final event output fix

This commit is contained in:
Felix Krause 2017-02-14 22:30:48 +01:00
parent b15f3dbae9
commit d6ace28775
2 changed files with 8 additions and 2 deletions

View File

@ -1120,7 +1120,10 @@ proc display*(p: YamlParser, event: YamlStreamEvent): string
result = "+DOC"
when defined(yamlScalarRepInd):
if event.explicitDirectivesEnd: result &= " ---"
of yamlEndDoc: result = "-DOC"
of yamlEndDoc:
result = "-DOC"
when defined(yamlScalarRepInd):
if event.explicitDocumentEnd: result &= " ..."
of yamlStartMap:
result = "+MAP" & p.renderAttrs(event.mapTag, event.mapAnchor, true)
of yamlStartSeq:

View File

@ -270,7 +270,10 @@ proc `$`*(event: YamlStreamEvent): string {.raises: [].} =
result = "+DOC"
when defined(yamlScalarRepInd):
if event.explicitDirectivesEnd: result &= " ---"
of yamlEndDoc: result = "-DOC"
of yamlEndDoc:
result = "-DOC"
when defined(yamlScalarRepInd):
if event.explicitDocumentEnd: result &= " ..."
of yamlStartMap: result = "+MAP" & renderAttrs(event.mapTag, event.mapAnchor)
of yamlStartSeq: result = "+SEQ" & renderAttrs(event.seqTag, event.seqAnchor)
of yamlScalar: