From ba439be2be904f76256a044fee217c0c5994def4 Mon Sep 17 00:00:00 2001 From: MichiyamaKaren Date: Thu, 21 Sep 2023 22:50:13 +0800 Subject: [PATCH] update latex command regex --- mathtranslate/process_latex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mathtranslate/process_latex.py b/mathtranslate/process_latex.py index b0e6d53..b51354c 100644 --- a/mathtranslate/process_latex.py +++ b/mathtranslate/process_latex.py @@ -19,7 +19,7 @@ def get_pattern_command_full(name, n=None): pattern = rf'\\({name})' if n is None: - pattern += rf'{spaces}({options})?' + pattern += rf'({spaces}{options})'+'{0,2}' n = 1 begin_brace = 3 else: