summaryrefslogtreecommitdiff
path: root/scanner.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-08-23 07:11:21 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-08-23 07:11:21 +0200
commit109fcc2deebb23025e17d981de1bd29669b33e9a (patch)
tree9a6f5b7a38ff7b28514a30f72f94223441402d73 /scanner.py
parent9673bc2b6008461b3e5bcb21cad925730e92baab (diff)
downloadruamel.yaml-109fcc2deebb23025e17d981de1bd29669b33e9a.tar.gz
fix #158 folded scalars not roundtripping0.15.61
Diffstat (limited to 'scanner.py')
-rw-r--r--scanner.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scanner.py b/scanner.py
index 5033339..ab20d7c 100644
--- a/scanner.py
+++ b/scanner.py
@@ -145,7 +145,7 @@ class Scanner(object):
def reader(self):
# type: () -> Any
try:
- return self._scanner_reader
+ return self._scanner_reader # type: ignore
except AttributeError:
if hasattr(self.loader, 'typ'):
self._scanner_reader = self.loader.reader
@@ -1172,6 +1172,8 @@ class Scanner(object):
#
# This is the folding according to the specification:
+ if folded and line_break == '\n':
+ chunks.append('\a')
if (
folded
and line_break == '\n'