From 06ea5a9886a6abb88b7a81481c6600477088f2c6 Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Sun, 5 Aug 2018 12:27:52 +0200 Subject: leading empty lines and comments on root level literal scalars not preserved added test, fixed both now you can have --- !some_tag | # with a comment this is a multi- line literal scalar --- scalarstring.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scalarstring.py') diff --git a/scalarstring.py b/scalarstring.py index 4b1a317..ef283d2 100644 --- a/scalarstring.py +++ b/scalarstring.py @@ -28,7 +28,7 @@ class ScalarString(text_type): class PreservedScalarString(ScalarString): - __slots__ = () + __slots__ = ('comment') # the comment after the | on the first line style = '|' -- cgit v1.2.1