diff --git a/pyaml/__init__.py b/pyaml/__init__.py index 7bcac27..07abe03 100644 --- a/pyaml/__init__.py +++ b/pyaml/__init__.py @@ -132,7 +132,7 @@ def represent_stringish(dumper, data): style = dumper.pyaml_string_val_style if not style: style = 'plain' - if '\n' in data or not data or data == '-' or data[0] in '!&*[': + if '\n' in data or not data or data == '-' or data[0] in '!&*[' or '#' in data: style = 'literal' if '\n' in data[:-1]: for line in data.splitlines(): diff --git a/setup.py b/setup.py index 76760db..7e84db4 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name = 'pyaml', - version = '20.3.1', + version = '20.4.0', author = 'Mike Kazantsev', author_email = 'mk.fraggod@gmail.com', license = 'WTFPL',