fix code snippets indendations

This commit is contained in:
fsylvain committed 2026-09-19 21:25:38 +02:00
1 parent 7eb9a06619
commit ce8e59c8eb
2 files changed
+10 -5

No files matched your search

+1 -1
View File
@@ -93,7 +93,7 @@ def _highlight_code_lines(code: str, lang: str) -> list[str]:
lexer = TextLexer()
highlighted = highlight(code, lexer, _CODE_FORMATTER)
lines = highlighted.rstrip("\n").split("\n")
return [f'<span style="color:{_CODE_FG};">{line}</span>' for line in lines]
return [f'<span style="color:{_CODE_FG}; white-space:pre;">{line}</span>' for line in lines]
def _reset_cursor_format(cursor: QTextCursor) -> None: