[GH-ISSUE #1332] When will micromark be available to custom rules? #661

Closed
opened 2026-03-03 01:28:52 +03:00 by kerem · 7 comments
Owner

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 specifying micromark be available or when will the default be set to micromark?

Thank you!

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 specifying `micromark` be available or when will the default be set to micromark? Thank you!
kerem 2026-03-03 01:28:52 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@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.

<!-- gh-comment-id:2303251439 --> @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.
Author
Owner

@rachmari commented on GitHub (Aug 21, 2024):

Thank you for the timeline @DavidAnson 🙏

<!-- gh-comment-id:2303258312 --> @rachmari commented on GitHub (Aug 21, 2024): Thank you for the timeline @DavidAnson 🙏
Author
Owner

@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.)

<!-- gh-comment-id:2303325748 --> @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.)
Author
Owner

@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.

<!-- gh-comment-id:2316324996 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2316472449 --> @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.
Author
Owner

@DavidAnson commented on GitHub (Oct 26, 2024):

@rachmari, micromark parser tokens are available to custom rules in the just-published v0.36.0.

Documentation: https://github.com/DavidAnson/markdownlint/blob/main/doc/CustomRules.md

There are a few convenience functions in markdownlint-rule-helpers/micromark.

<!-- gh-comment-id:2439271412 --> @DavidAnson commented on GitHub (Oct 26, 2024): @rachmari, `micromark` parser tokens are available to custom rules in the just-published `v0.36.0`. Documentation: <https://github.com/DavidAnson/markdownlint/blob/main/doc/CustomRules.md> There are a few convenience functions in `markdownlint-rule-helpers/micromark`.
Author
Owner

@rachmari commented on GitHub (Oct 28, 2024):

@DavidAnson that exciting! Thank you for letting me know. We'll get our Markdownlint version updated soon.

<!-- gh-comment-id:2442855303 --> @rachmari commented on GitHub (Oct 28, 2024): @DavidAnson that exciting! Thank you for letting me know. ✨ We'll get our Markdownlint version updated soon.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#661
No description provided.