diff options
author | Garret Raziel <boloomka@gmail.com> | 2014-08-15 16:57:50 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2014-08-19 11:15:35 +0200 |
commit | 977d275cead808002829703389868162e7813ca4 (patch) | |
tree | f92e72cff5df11e2146ef8ebecad449418bea2f3 /yamlish.py | |
parent | 23c3d60f4d2b5416db9334706cddf3b3617d3509 (diff) | |
download | yamlish-977d275cead808002829703389868162e7813ca4.tar.gz |
correct handling of UTF-8 input0.14
Release 0.14
Diffstat (limited to 'yamlish.py')
-rw-r--r-- | yamlish.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -155,10 +155,10 @@ class _YamlishDumper(yaml.dumper.SafeDumper): def str_representer_compact_multiline(dumper, data): style = None - if '\n' in data: - style = '|' if isinstance(data, str): data = data.decode('utf-8') # assumes all your strings are UTF-8 encoded + if '\n' in data: + style = '|' tag = u'tag:yaml.org,2002:str' return dumper.represent_scalar(tag, data, style) |