-
-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add support for Markdown Front Matter parsing #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for Markdown Front Matter parsing #92
Conversation
✅ Deploy Preview for eslint-code-explorer ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This is looking good. Can you please check the CI failures? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds support for Markdown Front Matter parsing in code-explorer by introducing a new front matter option that supports "yaml" and "toml" formats as well as an "off" setting.
- Added a new constant array for front matter options in src/lib/const.ts
- Extended option types in src/hooks/use-explorer.ts and enabled corresponding parsing in src/hooks/use-ast.ts
- Updated the options component in src/components/options.tsx to include a front matter selection dropdown
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/lib/const.ts | Introduced markdownFrontmatters constant and updated defaultMarkdownOptions |
src/hooks/use-explorer.ts | Added MarkdownFrontmatter type |
src/hooks/use-ast.ts | Updated AST parsing to use front matter setting |
src/components/options.tsx | Added LabeledSelect for markdownFrontmatter |
Files not reviewed (1)
- package.json: Language not supported
Comments suppressed due to low confidence (1)
src/lib/const.ts:193
- [nitpick] The constant name 'markdownFrontmatters' is inconsistent with the singular option property 'markdownFrontmatter' used elsewhere. Consider renaming it (e.g., 'markdownFrontmatterOptions') for improved clarity.
export const markdownFrontmatters = [
…ithub.com/lumirlumir/fork-code-explorer into feat-support-markdown-frontmatter-parsing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Prerequisites checklist
What is the purpose of this pull request?
Hello,
I've added support for Markdown Front Matter parsing in code-explorer!
This feature leverages the newly introduced Front Matter parsing capability in
@eslint/[email protected]
. (eslint/markdown#328)code-explorer now supports parsing Front Matter in both
yaml
andtoml
formats.yaml
toml
What changes did you make? (Give an overview)
I've added
markdownFrontmatter
options to properly parse bothyaml
andtoml
front matter.I've also introduced an
Off
option, which is interpreted as the booleanfalse
.Related Issues
eslint/markdown#328
Is there anything you'd like reviewers to focus on?