diff --git a/yaml/parser.nim b/yaml/parser.nim index b81d82c..a2887be 100644 --- a/yaml/parser.nim +++ b/yaml/parser.nim @@ -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: diff --git a/yaml/stream.nim b/yaml/stream.nim index faa48d1..b7da231 100644 --- a/yaml/stream.nim +++ b/yaml/stream.nim @@ -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: