Skip to content

Commit 2c9cb5f

Browse files
committed
fix
1 parent 1dc5504 commit 2c9cb5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/compare_results.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ def parse_bool(value):
1616

1717
def colorize_delta(text, delta):
1818
"""Wrap delta text in green (positive) or red (negative) using LaTeX color syntax for GitHub markdown."""
19-
# Escape special LaTeX characters in the text
19+
# Replace % with \% and wrap in \text{} to handle special chars in LaTeX math mode
2020
escaped = text.replace("%", "\\%")
2121
if delta > 0:
22-
return f"$\\color{{green}}\\textsf{{{escaped}}}$"
22+
return f"$\\color{{green}}\\text{{{escaped}}}$"
2323
elif delta < 0:
24-
return f"$\\color{{red}}\\textsf{{{escaped}}}$"
24+
return f"$\\color{{red}}\\text{{{escaped}}}$"
2525
return text
2626

2727

0 commit comments

Comments
 (0)