mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-21 16:30:12 +01:00
Update to use named exports via / /async /promise /sync, simplify references via self-referencing, refine examples.
This commit is contained in:
parent
e41f034bef
commit
8da43dd246
96 changed files with 635 additions and 548 deletions
|
|
@ -20,7 +20,7 @@ const tokensInclude = new Set(
|
|||
* Converts a Markdown heading into an HTML fragment according to the rules
|
||||
* used by GitHub.
|
||||
*
|
||||
* @param {import("../helpers/micromark-helpers.cjs").Token} headingText Heading text token.
|
||||
* @param {import("markdownlint").MicromarkToken} headingText Heading text token.
|
||||
* @returns {string} Fragment string for heading.
|
||||
*/
|
||||
function convertHeadingToHTMLFragment(headingText) {
|
||||
|
|
@ -49,7 +49,7 @@ function convertHeadingToHTMLFragment(headingText) {
|
|||
/**
|
||||
* Unescapes the text of a String-type micromark Token.
|
||||
*
|
||||
* @param {import("../helpers/micromark-helpers.cjs").Token} token String-type micromark Token.
|
||||
* @param {import("markdownlint").MicromarkToken} token String-type micromark Token.
|
||||
* @returns {string} Unescaped token text.
|
||||
*/
|
||||
function unescapeStringTokenText(token) {
|
||||
|
|
@ -58,7 +58,7 @@ function unescapeStringTokenText(token) {
|
|||
.join("");
|
||||
}
|
||||
|
||||
/** @type {import("./markdownlint.mjs").Rule} */
|
||||
/** @type {import("markdownlint").Rule} */
|
||||
export default {
|
||||
"names": [ "MD051", "link-fragments" ],
|
||||
"description": "Link fragments should be valid",
|
||||
|
|
@ -101,7 +101,7 @@ export default {
|
|||
}
|
||||
|
||||
// Process link and definition fragments
|
||||
/** @type {import("../helpers/micromark-helpers.cjs").TokenType[][]} */
|
||||
/** @type {import("markdownlint").MicromarkTokenType[][]} */
|
||||
const parentChilds = [
|
||||
[ "link", "resourceDestinationString" ],
|
||||
[ "definition", "definitionDestinationString" ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue