fix last line displaying newline character
This commit is contained in:
@@ -181,9 +181,10 @@ def generate_markdown(totals: dict[str, int]) -> str:
|
||||
for lang, nbytes in pairs:
|
||||
pct = nbytes * 100 / total_bytes
|
||||
bar = "█" * int(pct / 2) # up to 50 chars
|
||||
lines.append(f"{bar} {lang}{pct:5.1f}%\\")
|
||||
lines.append(f"{bar} {lang}{pct:5.1f}%")
|
||||
|
||||
return "\n".join(lines)
|
||||
# Join with backslash + newline for markdown line breaks (except after last line)
|
||||
return "\\\n".join(lines)
|
||||
|
||||
|
||||
def fetch_readme(session: requests.Session) -> tuple[str, str]:
|
||||
|
||||
Reference in New Issue
Block a user