Mathpix / mathpix-markdown-it

Markdown rendering + Latex extras (equations, tables, ...), with conversion features, for the scientific community
MIT License
542 stars 45 forks source link

PR into master from dev/olga/6637-Hanging-conversions #284

Closed OlgaRedozubova closed 1 year ago

OlgaRedozubova commented 1 year ago

branch: dev/olga/6637-Hanging-conversions

Why:

Fixes [ocr-api] Hanging conversions #6637

What's being changed:

Changes have been made to block rules for footnotetext and footnote.

Previously, we accumulated content to find opening { and closing } tags. This resulted in slower performance for large documents.

Now, instead, we search for these tags for the current line and store the result about the number of open parentheses. Next, for the next line, we search for opening and closing tags based on this value. This significantly speeded up the parser.