Skip to content

fix(math): preserve arguments during heuristic removal - #426

Closed
RovshanMuradov wants to merge 1 commit into
kepano:mainfrom
RovshanMuradov:fix/mathml-argument-removals
Closed

RovshanMuradov wants to merge 1 commit into
kepano:mainfrom
RovshanMuradov:fix/mathml-argument-removals

Conversation

@RovshanMuradov

@RovshanMuradov RovshanMuradov commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #421

Removal heuristics deleted MathML arguments: invisible boxes (visibility:hidden, opacity:0, .invisible, e.g. mphantom) and elements matching page-chrome selectors, which leaves e.g. <mfrac> with one child. MathML arguments are now skipped by these heuristics; display:none, [hidden] and aria-hidden still remove them.

@RovshanMuradov
RovshanMuradov marked this pull request as ready for review October 12, 2026 07:28
@RovshanMuradov
RovshanMuradov marked this pull request as draft October 12, 2026 08:30
@RovshanMuradov

Copy link
Copy Markdown
Contributor Author

Closing to keep the review queue small: on six real arXiv HTML papers (~10k formulas) this change makes no difference to the extracted HTML or Markdown. Happy to reopen if a real page needs it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Page-chrome removal corrupts MathML fraction arguments

1 participant