mirror of https://github.com/status-im/NimYAML.git
parent
e33c448783
commit
89e18cebfa
|
@ -326,7 +326,7 @@ proc writeFolded(c: Context, scalar: string, indentation, indentStep: int,
|
||||||
t.append(newline & newline)
|
t.append(newline & newline)
|
||||||
t.append(repeat(' ', indentation + indentStep))
|
t.append(repeat(' ', indentation + indentStep))
|
||||||
curPos = indentation + indentStep
|
curPos = indentation + indentStep
|
||||||
elif curPos + (word.finish - word.start) > 80:
|
elif curPos + (word.finish - word.start + 1) > 80:
|
||||||
t.append(newline)
|
t.append(newline)
|
||||||
t.append(repeat(' ', indentation + indentStep))
|
t.append(repeat(' ', indentation + indentStep))
|
||||||
curPos = indentation + indentStep
|
curPos = indentation + indentStep
|
||||||
|
@ -822,4 +822,4 @@ proc transform*(input: Stream | string,
|
||||||
ss = newStringStream()
|
ss = newStringStream()
|
||||||
c = Context(target: ss, options: options)
|
c = Context(target: ss, options: options)
|
||||||
doTransform(c, genInput(input), resolveToCoreYamlTags)
|
doTransform(c, genInput(input), resolveToCoreYamlTags)
|
||||||
return ss.data
|
return ss.data
|
||||||
|
|
Loading…
Reference in New Issue