mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Formatter: Insert newline before some child types
This commit is contained in:
parent
35e96964da
commit
afba576da0
2 changed files with 18 additions and 9 deletions
|
@ -207,6 +207,7 @@ class BlueprintApp:
|
|||
a_lines = data.splitlines(keepends=True)
|
||||
b_lines = formatted_str.splitlines(keepends=True)
|
||||
diff_lines = []
|
||||
|
||||
for line in difflib.unified_diff(
|
||||
a_lines, b_lines, fromfile=file.name, tofile=file.name, n=5
|
||||
):
|
||||
|
@ -220,7 +221,7 @@ class BlueprintApp:
|
|||
diff_lines.append("\\ No newline at end of file\n")
|
||||
|
||||
print(
|
||||
f"\n{Colors.BOLD}{happened} {file.name}{Colors.CLEAR}:\n\n"+ "".join(diff_lines)
|
||||
f"{''.join(diff_lines)}\n{Colors.BOLD}{happened} {file.name}{Colors.CLEAR}\n"
|
||||
)
|
||||
|
||||
formatted_files += 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue