mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Formatter: Handle lists with only 1 item correctly
This commit is contained in:
parent
41042b0a78
commit
ffff63da41
1 changed files with 7 additions and 0 deletions
|
@ -143,6 +143,13 @@ class Format:
|
||||||
WHITESPACE_AFTER.append(",")
|
WHITESPACE_AFTER.append(",")
|
||||||
NEWLINE_AFTER.remove(",")
|
NEWLINE_AFTER.remove(",")
|
||||||
|
|
||||||
|
if last_not_whitespace != ",":
|
||||||
|
current_line = current_line[:-1]
|
||||||
|
commit_current_line(
|
||||||
|
1,
|
||||||
|
)
|
||||||
|
current_line = "]"
|
||||||
|
|
||||||
indent_levels -= 1
|
indent_levels -= 1
|
||||||
commit_current_line(
|
commit_current_line(
|
||||||
1,
|
1,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue