AutoYADM commit: 2025-03-25 13:30:08

This commit is contained in:
Daniel Fichtinger 2025-03-25 13:30:08 -04:00
parent 0bb5fd957a
commit fa9177b417

View file

@ -36,6 +36,7 @@ for line in sys.stdin:
skipping = True
print(line, end = "")
elif not line.rstrip():
# Empty line
in_par = not in_par
print()
# print(line, end="")
@ -45,17 +46,20 @@ for line in sys.stdin:
for next_line in sys.stdin:
# if not line.startswith((">", "```", "--")):
stripped = next_line.rstrip()
print("runs")
if stripped:
print("runs")
par.append(stripped)
else:
in_par = False
par.append("\n")
break
line = " ".join(par)
print(par)
# empty line, treat next section as paragraph
# TODO: fix signature being mangled and newlines erased
if not skipping:
wrapped = textwrap.wrap(line, width=74, break_long_words=False, replace_whitespace=True)
print("\n".join(wrapped))
else:
print(line, end = "")