Modify ↓
Ticket #220 (new defect)
yaml.dump indent parameter not affecting scalars in sequences
| Reported by: | xulfir@… | Owned by: | xi |
|---|---|---|---|
| Priority: | low | Component: | pyyaml |
| Severity: | minor | Keywords: | |
| Cc: |
Description
It seems that scalars in sequences aren't being affected by yaml.dump's indent parameter. This can create odd alignment mismatches when alternate indent values are used.
In python:
y = ['a', {'b':'c','d':{'e':'f','g':'h'},'i':['j','k']}, ['l', {'m':'n', 'o':'p'}, ['q','r']]]
print yaml.dump(y, default_flow_style=False, indent=4)
I expect:
- a
- b: c
d:
e: f
g: h
i:
- j
- k
- - l
- m: n
o: p
- - q
- r
Instead I get:
- a
- b: c
d:
e: f
g: h
i:
- j
- k
- - l
- m: n
o: p
- - q
- r
Attachments
Note: See
TracTickets for help on using
tickets.
