Skip to content

Commit 53b6274

Browse files
committed
docs: Fix toml tab bug. Resolve #1024.
1 parent c7ba70d commit 53b6274

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bugwarrior/docs/_ext/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ def run(self):
3636
tomllines = tomltext.split('\n')
3737
for i in range(0, len(self.content)): # mutate self.content
3838
# ini2toml removes newlines within sections, so we leave them as is
39-
if self.content[i] == '' and tomllines != '':
39+
if self.content[i] == '' and tomllines[0] != '':
4040
continue
4141
self.content[i] = tomllines.pop(0)
42+
if any(tomllines):
43+
raise ValueError(f'Unconsumed toml: {tomllines}')
4244

4345
toml = self._make_tab('toml')
4446

0 commit comments

Comments
 (0)