mirror of
https://github.com/status-im/NimYAML.git
synced 2025-01-11 20:14:19 +00:00
(hopefully) final event output fix
This commit is contained in:
parent
b15f3dbae9
commit
d6ace28775
@ -1120,7 +1120,10 @@ proc display*(p: YamlParser, event: YamlStreamEvent): string
|
|||||||
result = "+DOC"
|
result = "+DOC"
|
||||||
when defined(yamlScalarRepInd):
|
when defined(yamlScalarRepInd):
|
||||||
if event.explicitDirectivesEnd: result &= " ---"
|
if event.explicitDirectivesEnd: result &= " ---"
|
||||||
of yamlEndDoc: result = "-DOC"
|
of yamlEndDoc:
|
||||||
|
result = "-DOC"
|
||||||
|
when defined(yamlScalarRepInd):
|
||||||
|
if event.explicitDocumentEnd: result &= " ..."
|
||||||
of yamlStartMap:
|
of yamlStartMap:
|
||||||
result = "+MAP" & p.renderAttrs(event.mapTag, event.mapAnchor, true)
|
result = "+MAP" & p.renderAttrs(event.mapTag, event.mapAnchor, true)
|
||||||
of yamlStartSeq:
|
of yamlStartSeq:
|
||||||
|
@ -270,7 +270,10 @@ proc `$`*(event: YamlStreamEvent): string {.raises: [].} =
|
|||||||
result = "+DOC"
|
result = "+DOC"
|
||||||
when defined(yamlScalarRepInd):
|
when defined(yamlScalarRepInd):
|
||||||
if event.explicitDirectivesEnd: result &= " ---"
|
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 yamlStartMap: result = "+MAP" & renderAttrs(event.mapTag, event.mapAnchor)
|
||||||
of yamlStartSeq: result = "+SEQ" & renderAttrs(event.seqTag, event.seqAnchor)
|
of yamlStartSeq: result = "+SEQ" & renderAttrs(event.seqTag, event.seqAnchor)
|
||||||
of yamlScalar:
|
of yamlScalar:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user