summaryrefslogtreecommitdiff
path: root/emitter.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-10-27 18:22:43 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-10-27 18:22:43 +0200
commite5f7bc5866457e556c90f784769296410e924238 (patch)
tree644c4e1c0910af14db1d4fe1ef8d27ba60a65553 /emitter.py
parenta0d4b1a7f4998aa1d8015cf78bd043682bc9105b (diff)
downloadruamel.yaml-e5f7bc5866457e556c90f784769296410e924238.tar.gz
fixes issue #254 single question mark not dumped with quotes0.15.75
introduced re issue #62 for version 0.15.27 test in ruamel.yaml.data/special/single_indicator.yaml *When this change indeed resolves your problem, please **Close** this issue*. *(You can do so using the WorkFlow pull-down (close to the top right of this page))*
Diffstat (limited to 'emitter.py')
-rw-r--r--emitter.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/emitter.py b/emitter.py
index 942eced..c410f2e 100644
--- a/emitter.py
+++ b/emitter.py
@@ -1024,6 +1024,8 @@ class Emitter(object):
if ch in u'?:': # ToDo
if self.serializer.use_version == (1, 1):
flow_indicators = True
+ elif len(scalar) == 1: # single character
+ flow_indicators = True
if followed_by_whitespace:
block_indicators = True
if ch == u'-' and followed_by_whitespace: