Skip to content

Commit bece971

Browse files
committed
_markdown: Add try-catch for latex_to_katex
1 parent 2ec6446 commit bece971

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tex2lambda/filters/_markdown.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ def markdown_converter(
111111
"""
112112
match type(elem):
113113
case pf.Math:
114-
expression = latex_to_katex(elem.text)
114+
try:
115+
expression = latex_to_katex(elem.text)
116+
except:
117+
expression = elem.text
115118
return pf.Str(
116119
f"${expression}$"
117120
if elem.format == "InlineMath"

0 commit comments

Comments
 (0)