mirror of
https://github.com/thegeeklab/ansible-doctor.git
synced 2024-11-21 20:30:43 +00:00
fix newline handling
This commit is contained in:
parent
2b6d61bbfb
commit
7292e0ef37
@ -139,7 +139,11 @@ class Annotation:
|
|||||||
self._file_handler.seek(current_file_position)
|
self._file_handler.seek(current_file_position)
|
||||||
break
|
break
|
||||||
|
|
||||||
final = newline + next_line.replace("#", "").rstrip()
|
final = next_line.replace("#", "").rstrip()
|
||||||
|
if final[:1] == " ":
|
||||||
|
final = final[1:]
|
||||||
|
final = newline + final
|
||||||
|
|
||||||
# match if empty line or commented empty line
|
# match if empty line or commented empty line
|
||||||
test_line = next_line.replace("#", "").strip()
|
test_line = next_line.replace("#", "").strip()
|
||||||
if len(test_line) == 0:
|
if len(test_line) == 0:
|
||||||
@ -147,7 +151,7 @@ class Annotation:
|
|||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
newline = ""
|
newline = ""
|
||||||
print(final)
|
|
||||||
multiline.append(newline + final)
|
multiline.append(newline + final)
|
||||||
|
|
||||||
if parts[2].startswith("$"):
|
if parts[2].startswith("$"):
|
||||||
|
Loading…
Reference in New Issue
Block a user