Merge branch 'master' into devel

This commit is contained in:
Felix Krause 2017-08-30 18:06:18 +02:00
commit 78b029d17d
1 changed files with 6 additions and 1 deletions

View File

@ -1212,7 +1212,12 @@ proc constructChild*[O](s: var YamlStream, c: ConstructionContext,
proc representChild*(value: string, ts: TagStyle, c: SerializationContext) =
if isNil(value): c.put(scalarEvent("", yTagNimNilString))
else: representObject(value, ts, c, presentTag(string, ts))
else:
let tag = presentTag(string, ts)
echo "tag == ", tag
representObject(value, ts, c,
if tag == yTagQuestionMark and guessType(value) != yTypeUnknown:
yTagExclamationMark else: tag)
proc representChild*[T](value: seq[T], ts: TagStyle, c: SerializationContext) =
if isNil(value): c.put(scalarEvent("", yTagNimNilSeq))