feat: support Math in Markdown#299
Conversation
✅ Deploy Preview for eslint-code-explorer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@lumirlumir, I wanted to share some constructive feedback on your PRs:
|
There was a problem hiding this comment.
Pull request overview
Adds support in Code Explorer for the new math parsing option in the Markdown language (introduced in @eslint/markdown v8), including a UI toggle and an e2e test update.
Changes:
- Add a new
markdownMathboolean option (type + default) and expose it in the Markdown options panel. - Pass
maththrough to@eslint/markdown’s parser vialanguageOptions. - Bump
@eslint/markdownto^8.0.1and extend the e2e options-panel test to assert the new switch is visible.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/const.ts | Adds markdownMath to the default Markdown options. |
| src/hooks/use-explorer.ts | Extends MarkdownOptions to include markdownMath. |
| src/hooks/use-ast.ts | Wires markdownMath into the markdown parser languageOptions. |
| src/components/options.tsx | Adds a new “Math” switch to the Markdown options UI. |
| package.json | Updates @eslint/markdown dependency to v8. |
| package-lock.json | Lockfile updates for @eslint/markdown@8 and its transitive deps/engines. |
| e2e-tests/options.test.ts | Adds an assertion that the “Math” switch is visible for Markdown. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| key => window.localStorage.getItem(key), | ||
| storageKey, | ||
| ); | ||
| return page.evaluate(key => { |
There was a problem hiding this comment.
Just refactored the test helper code a bit to follow the existing convention:
code-explorer/e2e-tests/persistence.test.ts
Lines 17 to 27 in ef5285f
code-explorer/e2e-tests/persistence.test.ts
Lines 42 to 48 in ef5285f
Prerequisites checklist
What is the purpose of this pull request?
This PR updates Code Explorer to support the Math parsing option for the Markdown language, introduced in eslint/markdown#617 and released as part of
@eslint/markdownv8.I've also updated
e2e-tests/options.test.tsto include tests for the newly added Math option.What changes did you make? (Give an overview)
Related Issues
Ref: eslint/markdown#331
Is there anything you'd like reviewers to focus on?
Actually, adding AST node interaction and expansion tests would make this feature more robust, but there are currently no tests for those cases. I’d like to continue the work on #398, since it requires many of the changes.