Skip to content

Rework the math parser - #1752

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Sep 17, 2026
Merged

cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The custom incremental parser and retry behavior require runtime validation beyond static review.

Pull request overview

Reworks block-math parsing into a dedicated module with container-aware content ranges, incremental retry handling, TeX highlighting, and updated previews.

Changes:

  • Adds comprehensive math parser and preview tests.
  • Moves parser logic into src/modules/math.
  • Extracts math preview handling and removes the legacy parser.
File summaries
File Description
CoreEditor/test/math.test.ts Adds parser, incremental parsing, highlighting, and preview tests.
CoreEditor/test/lezer.test.ts Removes math tests relocated to the dedicated suite.
CoreEditor/src/modules/math/index.ts Implements the new block-math parser and retry logic.
CoreEditor/src/styling/nodes/math.ts Adds content-aware math preview decorations.
CoreEditor/src/styling/nodes/code.ts Removes math preview code.
CoreEditor/src/styling/markdown.ts Registers the new parser and preview module.
CoreEditor/src/@vendor/joplin/markdownMathParser.ts Removes the superseded implementation.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@cyanzhong
cyanzhong merged commit a37ddbf into main Sep 17, 2026
2 checks passed
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.

2 participants