Reimplement MD036/no-emphasis-as-heading using micromark tokens.

This commit is contained in:
David Anson 2024-03-19 21:20:44 -07:00
parent 6f6348a63d
commit 82441faa91
3 changed files with 66 additions and 84 deletions

View file

@ -381,8 +381,8 @@ function inHtmlFlow(token) {
* Determines a list of Micromark tokens matches and returns a subset.
*
* @param {Token[]} tokens Micromark tokens.
* @param {string[]} matchTypes Types to match.
* @param {string[]} [resultTypes] Types to return.
* @param {TokenType[]} matchTypes Types to match.
* @param {TokenType[]} [resultTypes] Types to return.
* @returns {Token[] | null} Matching tokens.
*/
function matchAndGetTokensByType(tokens, matchTypes, resultTypes) {