diff options
author | Anthon van der Neut <anthon@mnt.org> | 2016-02-27 14:53:44 +0100 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2016-02-27 14:53:44 +0100 |
commit | 638b3d07b210f8636507c1530e925445f9c3aba9 (patch) | |
tree | d0c35dd79eae8ed610a9e33df8c3ea8b4e76a767 /util.py | |
parent | 0fbfd2d3f7895ebae49dc85abbe8844abb0e19bf (diff) | |
download | ruamel.yaml-638b3d07b210f8636507c1530e925445f9c3aba9.tar.gz |
implement indent for scalar list elements
Diffstat (limited to 'util.py')
-rw-r--r-- | util.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -44,11 +44,13 @@ def load_yaml_guess_indent(stream): continue if prev_line_key_only is not None and rline: idx = 0 - while line[idx] in ' -': # this will end on ':' + while line[idx] in ' -': idx += 1 if idx > prev_line_key_only: indent = idx - prev_line_key_only break + else: + indent = 2 prev_line_key_only = None return round_trip_load(yaml_str), indent |