mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Formatter: Insert newline after comments
This commit is contained in:
parent
8c4eebba08
commit
441a7a38bd
1 changed files with 4 additions and 1 deletions
|
@ -67,7 +67,10 @@ class Format:
|
|||
|
||||
tokenized_str += item_as_string
|
||||
|
||||
if item_as_string in NEWLINE_AFTER:
|
||||
if (
|
||||
item_as_string in NEWLINE_AFTER
|
||||
or item.type == tokenizer.TokenType.COMMENT
|
||||
):
|
||||
tokenized_str += "\n" + (indent_levels * " ")
|
||||
elif item_as_string in WHITESPACE_AFTER:
|
||||
tokenized_str += " "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue