mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #1332] When will micromark be available to custom rules? #2510
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#2510
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rachmari on GitHub (Aug 21, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1332
Hello 👋
We have implemented a large set of custom rules in the https://github.com/github/docs project. I saw your update in https://github.com/github/docs/pull/33113 that the Markdownlint project will be moving towards micromark. We'd like to write a new custom rule that looks at Markdown tables that include Liquid templating syntax. It looks like micromark exposes more information about the delimiter row of a table than markdown-it, making the rule easier to write with the micromark parser.
I noticed that in the latest version 0.34.0, specifying the parser
parser: 'micromark'results in an error. When will specifyingmicromarkbe available or when will the default be set to micromark?Thank you!
@DavidAnson commented on GitHub (Aug 21, 2024):
Not sure. :) The goal of the current release (which should be out in maybe two weeks) is to convert all the core rules over so markdown-it no longer needs to run by default. There have been a lot of rule changes to get to this point, so I anticipate a couple of regressions. The goal for the next release will probably be to surface micromark for custom rules. As part of that, I want to review the public API and maybe also expose some useful functions like the helpers library does today.
@rachmari commented on GitHub (Aug 21, 2024):
Thank you for the timeline @DavidAnson 🙏
@DavidAnson commented on GitHub (Aug 22, 2024):
@rachmari If you want early access, you and I could coordinate to PR any interesting rules into this repo as test cases. That may not be practical or interesting to you, but it's an opportunity for you to play around a little earlier. (I suppose you could do the same in a fork of the repo without sharing it back, too.)
@rachmari commented on GitHub (Aug 28, 2024):
Hi @DavidAnson. Sorry I missed this follow up last week.
Unfortunately, our rules are often very specific to our authoring system for docs.github.com being a combination of Liquid (including custom Liquid) and Markdown. We run into several cases where we need to reimplement a rule already available in Markdownlint due to the implications of how we use Liquid to version Markdown. Unfortunately, this means most (probably all) of our custom rules wouldn't be much use to Markdownlint. However, I do have an issue to go through all of our rules and identify any that might be upstreamable.
@DavidAnson commented on GitHub (Aug 29, 2024):
No worries. FYI that the first library release (not everything you want, but on the path) could go out as soon as tonight or tomorrow night if everything cooperates.
@DavidAnson commented on GitHub (Oct 26, 2024):
@rachmari,
micromarkparser tokens are available to custom rules in the just-publishedv0.36.0.Documentation: https://github.com/DavidAnson/markdownlint/blob/main/doc/CustomRules.md
There are a few convenience functions in
markdownlint-rule-helpers/micromark.@rachmari commented on GitHub (Oct 28, 2024):
@DavidAnson that exciting! Thank you for letting me know. ✨ We'll get our Markdownlint version updated soon.