Skip to content

Commit

Permalink
Fix uiri#65: Emit blank lines between tables
Browse files Browse the repository at this point in the history
  • Loading branch information
uiri committed Nov 23, 2016
1 parent c45b5ff commit 93236c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,8 @@ def dumps(o):
for section in sections:
addtoretval, addtosections = _dump_sections(sections[section], section)
if addtoretval:
if retval and retval[-2:] != "\n\n":
retval += "\n"
retval += "["+section+"]\n"
retval += addtoretval
for s in addtosections:
Expand Down Expand Up @@ -664,7 +666,7 @@ def _dump_sections(o, sup):
arrayoftables = True
if arrayoftables:
for a in o[section]:
arraytabstr = ""
arraytabstr = "\n"
arraystr += "[["+sup+qsection+"]]\n"
s, d = _dump_sections(a, sup+qsection)
if s:
Expand Down

0 comments on commit 93236c2

Please sign in to comment.