also fix math formula enclosed in dollars
This commit is contained in:
parent
b89f4e83fd
commit
e94735125b
2
main.py
2
main.py
@ -59,7 +59,7 @@ def fix_math_content(content):
|
|||||||
|
|
||||||
|
|
||||||
def fix_math(content):
|
def fix_math(content):
|
||||||
math_regex = re.compile(r'(\\[\[\(])(.+?)(\\[\)\]])')
|
math_regex = re.compile(r'(\\[\[\(]|\${1,2}[^0-9])(.+?)(\${1,2}|\\[$\)\]])')
|
||||||
pos = 0
|
pos = 0
|
||||||
out = ''
|
out = ''
|
||||||
while m := math_regex.search(content, pos):
|
while m := math_regex.search(content, pos):
|
||||||
|
Loading…
Reference in New Issue
Block a user