aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGarret Raziel <boloomka@gmail.com>2014-08-15 16:57:50 +0200
committerMatěj Cepl <mcepl@redhat.com>2014-08-19 11:15:35 +0200
commit977d275cead808002829703389868162e7813ca4 (patch)
treef92e72cff5df11e2146ef8ebecad449418bea2f3
parent23c3d60f4d2b5416db9334706cddf3b3617d3509 (diff)
downloadyamlish-977d275cead808002829703389868162e7813ca4.tar.gz
correct handling of UTF-8 input0.14
Release 0.14
-rw-r--r--setup.py2
-rw-r--r--yamlish.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 32a15e4..5cc3c91 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ def read(fname):
setup(
name='yamlish',
- version="0.13",
+ version="0.14",
description='Python implementation of YAMLish',
author='Matěj Cepl',
author_email='mcepl@redhat.com',
diff --git a/yamlish.py b/yamlish.py
index 467689a..28e8aea 100644
--- a/yamlish.py
+++ b/yamlish.py
@@ -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)