Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Text/TeXMath/Readers/TeX.hs
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ scriptArg = (fst <$> operatorname)
-- other script, and then reparsing it would take time exponential in
-- the nesting depth.
scripted :: Maybe Bool -> Bool -> Exp -> TP Exp
scripted limits convertible a = try $ do
scripted limits convertible a = do
let sub1 = symbol "_" >> scriptArg -- see #273
let sup1 = (symbol "^" >> scriptArg) <|> primes
scripts <- (do m <- sub1
Expand Down
7 changes: 7 additions & 0 deletions test/reader/tex/nested_scripts_error_performance.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<<< tex
x_{x_{x_{x_{x_{x_{x_{x_{x_{x_{x_{x_{x_{x_{x^{x^{x^{x^{x^{x^{x^{x^{x^{x^{x^{x^{x^{x^{x^{x\right)}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
>>> native
x^{x^{x^{x^{x\right)}}}}}}}}}}}}}}}}}}}}
^
unexpected control sequence \right
expecting "%", "\\label", "\\tag", "\\nonumber", whitespace or "\\allowbreak"