Commit 114817f
authored
Fix trailing whitespace when dumping dicts with indent
When dumping a dict with indent > 0, `dict_to_json` would insert extra trailing whitespace before the opening and closing newlines of the dict.
Also, when dumping an empty dict, two newlines would be inserted.
This commit fixes both of these issues.1 parent fdd4f03 commit 114817f
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | | - | |
| 111 | + | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
0 commit comments