Skip to content

Commit f78f0a2

Browse files
committed
Reformat style.
1 parent 754c263 commit f78f0a2

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

sites/highlight.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,19 @@ def shell_to_html(snippet: str) -> str:
142142
output = escaped_snippet.replace("$ ", '<span class="prompt">$ </span>')
143143

144144
# Replace ANSI escape code with HTML tag
145-
output = output.replace("\x1B[1m", '<span class="bold">')
146-
output = output.replace("\x1B[0m", "</span>")
147-
output = output.replace("\x1B[31m", '<span class="red">')
148-
output = output.replace("\x1B[32m", '<span class="green">')
149-
output = output.replace("\x1B[34m", '<span class="blue">')
150-
output = output.replace("\x1B[35m", '<span class="magenta">')
151-
output = output.replace("\x1B[90m", '<span class="gray">')
152-
output = output.replace("\x1B[1;36m", '<span class="bright-cyan">')
153-
output = output.replace("\x1B[1;31m", '<span class="bright-red">')
154-
output = output.replace("\x1B[1;32m", '<span class="bright-green">')
155-
output = output.replace("\x1B[1;34m", '<span class="bright-blue">')
156-
output = output.replace("\x1B[1;35m", '<span class="bright-magenta">')
157-
output = output.replace("\x1B[1;36m", '<span class="bright-cyan">')
145+
output = output.replace("\x1b[1m", '<span class="bold">')
146+
output = output.replace("\x1b[0m", "</span>")
147+
output = output.replace("\x1b[31m", '<span class="red">')
148+
output = output.replace("\x1b[32m", '<span class="green">')
149+
output = output.replace("\x1b[34m", '<span class="blue">')
150+
output = output.replace("\x1b[35m", '<span class="magenta">')
151+
output = output.replace("\x1b[90m", '<span class="gray">')
152+
output = output.replace("\x1b[1;36m", '<span class="bright-cyan">')
153+
output = output.replace("\x1b[1;31m", '<span class="bright-red">')
154+
output = output.replace("\x1b[1;32m", '<span class="bright-green">')
155+
output = output.replace("\x1b[1;34m", '<span class="bright-blue">')
156+
output = output.replace("\x1b[1;35m", '<span class="bright-magenta">')
157+
output = output.replace("\x1b[1;36m", '<span class="bright-cyan">')
158158
return output
159159

160160

0 commit comments

Comments
 (0)