diff options
author | Anthon van der Neut <anthon@mnt.org> | 2019-04-23 08:33:36 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2019-04-23 08:33:36 +0200 |
commit | a648518ebda2003a61649c86938dd3846810a9b0 (patch) | |
tree | 18f7d93d37e50073fa3eb12f4af9138761f5228f /scanner.py | |
parent | 0d1300c8b70de0ad2990b3f95629305dee870f0a (diff) | |
download | ruamel.yaml-a648518ebda2003a61649c86938dd3846810a9b0.tar.gz |
add line-break to EOF comment without one0.15.94
fixes issue #286
*When this change indeed resolves your problem, please **Close** this issue*.
*(You can do so using the WorkFlow pull-down (close to the top right of this page))*
Diffstat (limited to 'scanner.py')
-rw-r--r-- | scanner.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1877,6 +1877,10 @@ class RoundTripScanner(Scanner): while ch not in _THE_END: ch = srp() if ch == '\0': # don't gobble the end-of-stream character + # but add an explicit newline as "YAML processors should terminate + # the stream with an explicit line break + # https://yaml.org/spec/1.2/spec.html#id2780069 + comment += '\n' break comment += ch srf() |