diff --git a/latexdiff b/latexdiff index 01c5684..b365c9c 100755 --- a/latexdiff +++ b/latexdiff @@ -2576,9 +2576,9 @@ sub take_comments_and_newline_from_frac() { # \frac1 -> \frac{1} # \frac a -> \frac{a} # \frac \lambda -> \frac{\lambda} - s/\\frac(?:${space}+\{($pat_n)\}|${space}*(\d)|${space}+(\w)|${space}*(\\[a-zA-Z]+))/\\frac\{$1$2$3$4\}/g; + s/\\frac(?|${space}+\{($pat_n)\}|${space}*(\d)|${space}+(\w)|${space}*(\\[a-zA-Z]+))/\\frac\{$1\}/g; # same as above for the second argument of frac - s/\\frac(\{$pat_n\})(?:${space}*\{($pat_n)\}|${space}*(\d)|${space}+(\w)|${space}*(\\[a-zA-Z]+))/\\frac$1\{$2$3$4$5\}/g; + s/\\frac(\{$pat_n\})(?|${space}*\{($pat_n)\}|${space}*(\d)|${space}+(\w)|${space}*(\\[a-zA-Z]+))/\\frac$1\{$2\}/g; } # preprocess($string, ..)