-
Notifications
You must be signed in to change notification settings - Fork 63
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
Bug: False positive markdown/no-missing-label-refs
on GFM Alerts
#294
Comments
Thanks for the issue! I can reproduce this with I think this should be fixed in the parser as it treats |
Yes, this is an issue with the parser not supporting GitHub alerts. It needs to be fixed there. Opened: syntax-tree/mdast-util-gfm#2 |
So it looks like alerts are not actually part of GFM and are just an HTML transform: By "HTML transform", they mean that the parsing of the Markdown isn't any different, it's just the way that the Markdown is interpreted while transforming to HTML that changes. Here's the GFM spec: We have a couple options for what to do here:
|
Agreed on 1, this feels like a plugin to me. GitHub alert labels are just one example of a nonstandard extension to GFM. Folks writing |
We would then always use this plugin when parsing in |
Yes. I think we should maintain the sanctity of what "GFM" means and ensure it matches the spec by default. If we want to create an AST representation of alerts, then I think that should be opt-in as a language option for |
Environment
ESLint version: 9.12.0
@eslint/markdown version: 6.2.1
Node version: 22.9.0
npm version: 10.8.3
Operating System: macOS 14.7
Which language are you using?
gfm
What did you do?
Configuration
Which is being rendered on GH as:
Note
Useful information that users should know, even when skimming content.
Tip
Helpful advice for doing things better or more easily.
Important
Key information users need to know to achieve their goal.
Warning
Urgent info that needs immediate user attention to avoid problems.
Caution
Advises about risks or negative outcomes of certain actions.
What did you expect to happen?
No violations.
What actually happened?
Link to Minimal Reproducible Example
https://stackblitz.com/edit/118f65b5-5b7b-4190-9fbe-b023b0542a4e?file=package.json
Participation
Additional comments
More info on GFM Alerts:
The text was updated successfully, but these errors were encountered: