diff --git a/README.md b/README.md
index 76892ef6..fcc6e2c3 100644
--- a/README.md
+++ b/README.md
@@ -126,33 +126,33 @@ See [Rules.md](doc/Rules.md) for more details.
Tags group related rules and can be used to enable/disable multiple
rules at once.
-* **accessibility** - MD045
-* **atx** - MD018, MD019
-* **atx_closed** - MD020, MD021
-* **blank_lines** - MD012, MD022, MD031, MD032, MD047
-* **blockquote** - MD027, MD028
-* **bullet** - MD004, MD005, MD006, MD007, MD032
-* **code** - MD014, MD031, MD038, MD040, MD046, MD048
-* **emphasis** - MD036, MD037, MD049, MD050
-* **hard_tab** - MD010
-* **headers** - MD001, MD002, MD003, MD018, MD019, MD020, MD021, MD022,
- MD023, MD024, MD025, MD026, MD036, MD041, MD043
-* **headings** - MD001, MD002, MD003, MD018, MD019, MD020, MD021, MD022,
- MD023, MD024, MD025, MD026, MD036, MD041, MD043
-* **hr** - MD035
-* **html** - MD033
-* **images** - MD045, MD052, MD053
-* **indentation** - MD005, MD006, MD007, MD027
-* **language** - MD040
-* **line_length** - MD013
-* **links** - MD011, MD034, MD039, MD042, MD051, MD052, MD053
-* **ol** - MD029, MD030, MD032
-* **spaces** - MD018, MD019, MD020, MD021, MD023
-* **spelling** - MD044
-* **ul** - MD004, MD005, MD006, MD007, MD030, MD032
-* **url** - MD034
-* **whitespace** - MD009, MD010, MD012, MD027, MD028, MD030, MD037,
- MD038, MD039
+* **`accessibility`** - `MD045`
+* **`atx`** - `MD018`, `MD019`
+* **`atx_closed`** - `MD020`, `MD021`
+* **`blank_lines`** - `MD012`, `MD022`, `MD031`, `MD032`, `MD047`
+* **`blockquote`** - `MD027`, `MD028`
+* **`bullet`** - `MD004`, `MD005`, `MD006`, `MD007`, `MD032`
+* **`code`** - `MD014`, `MD031`, `MD038`, `MD040`, `MD046`, `MD048`
+* **`emphasis`** - `MD036`, `MD037`, `MD049`, `MD050`
+* **`hard_tab`** - `MD010`
+* **`headers`** - `MD001`, `MD002`, `MD003`, `MD018`, `MD019`, `MD020`, `MD021`,
+ `MD022`, `MD023`, `MD024`, `MD025`, `MD026`, `MD036`, `MD041`, `MD043`
+* **`headings`** - `MD001`, `MD002`, `MD003`, `MD018`, `MD019`, `MD020`, `MD021`,
+ `MD022`, `MD023`, `MD024`, `MD025`, `MD026`, `MD036`, `MD041`, `MD043`
+* **`hr`** - `MD035`
+* **`html`** - `MD033`
+* **`images`** - `MD045`, `MD052`, `MD053`
+* **`indentation`** - `MD005`, `MD006`, `MD007`, `MD027`
+* **`language`** - `MD040`
+* **`line_length`** - `MD013`
+* **`links`** - `MD011`, `MD034`, `MD039`, `MD042`, `MD051`, `MD052`, `MD053`
+* **`ol`** - `MD029`, `MD030`, `MD032`
+* **`spaces`** - `MD018`, `MD019`, `MD020`, `MD021`, `MD023`
+* **`spelling`** - `MD044`
+* **`ul`** - `MD004`, `MD005`, `MD006`, `MD007`, `MD030`, `MD032`
+* **`url`** - `MD034`
+* **`whitespace`** - `MD009`, `MD010`, `MD012`, `MD027`, `MD028`, `MD030`, `MD037`,
+ `MD038`, `MD039`
## Configuration
diff --git a/doc-build/build-rules.mjs b/doc-build/build-rules.mjs
index 470cc80d..6093662b 100644
--- a/doc-build/build-rules.mjs
+++ b/doc-build/build-rules.mjs
@@ -5,6 +5,7 @@ import { newLineRe } from "../helpers/helpers.js";
import { deprecatedRuleNames, fixableRuleNames } from "../lib/constants.js";
const pathFor = (relativePath) => new URL(relativePath, import.meta.url);
+const inCode = (items) => items.map((item) => `\`${item}\``);
const sortedComma = (items) => items.sort().join(", ");
const linesFrom = (text) => text.split(newLineRe);
@@ -28,7 +29,7 @@ for (const rule of rules) {
);
const section = [];
section.push(
- `## ${decorator}${name} - ${rule.description}${decorator}`,
+ `## ${decorator}\`${name}\` - ${rule.description}${decorator}`,
""
);
if (deprecated) {
@@ -38,9 +39,9 @@ for (const rule of rules) {
);
}
section.push(
- `Tags: ${sortedComma(rule.tags)}`,
+ `Tags: ${sortedComma(inCode(rule.tags))}`,
"",
- `Aliases: ${sortedComma(rule.names.slice(1))}`,
+ `Aliases: ${sortedComma(inCode(rule.names.slice(1)))}`,
""
);
const ruleData = schema.properties[name];
diff --git a/doc/Rules.md b/doc/Rules.md
index 4cd31b44..3ddc1b0e 100644
--- a/doc/Rules.md
+++ b/doc/Rules.md
@@ -7,11 +7,11 @@ deprecated, but still provided for backward-compatibility.
-## MD001 - Heading levels should only increment by one level at a time
+## `MD001` - Heading levels should only increment by one level at a time
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: header-increment, heading-increment
+Aliases: `header-increment`, `heading-increment`
This rule is triggered when you skip heading levels in a Markdown document, for
example:
@@ -47,13 +47,13 @@ when skipped - especially for accessibility scenarios. More information:
-## ~~MD002 - First heading should be a top-level heading~~
+## ~~`MD002` - First heading should be a top-level heading~~
> This rule is deprecated and provided for backward-compatibility
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: first-header-h1, first-heading-h1
+Aliases: `first-header-h1`, `first-heading-h1`
Parameters:
@@ -87,11 +87,11 @@ information: .
-## MD003 - Heading style
+## `MD003` - Heading style
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: header-style, heading-style
+Aliases: `header-style`, `heading-style`
Parameters:
@@ -138,11 +138,11 @@ Rationale: Consistent formatting makes it easier to understand a document.
-## MD004 - Unordered list style
+## `MD004` - Unordered list style
-Tags: bullet, ul
+Tags: `bullet`, `ul`
-Aliases: ul-style
+Aliases: `ul-style`
Parameters:
@@ -189,11 +189,11 @@ Rationale: Consistent formatting makes it easier to understand a document.
-## MD005 - Inconsistent indentation for list items at the same level
+## `MD005` - Inconsistent indentation for list items at the same level
-Tags: bullet, indentation, ul
+Tags: `bullet`, `indentation`, `ul`
-Aliases: list-indent
+Aliases: `list-indent`
Fixable: Most violations can be fixed by tooling
@@ -245,13 +245,13 @@ Rationale: Violations of this rule can lead to improperly rendered content.
-## ~~MD006 - Consider starting bulleted lists at the beginning of the line~~
+## ~~`MD006` - Consider starting bulleted lists at the beginning of the line~~
> This rule is deprecated and provided for backward-compatibility
-Tags: bullet, indentation, ul
+Tags: `bullet`, `indentation`, `ul`
-Aliases: ul-start-left
+Aliases: `ul-start-left`
Fixable: Most violations can be fixed by tooling
@@ -294,11 +294,11 @@ characters if you use 4 space tabs, or 1 character if you use 2 space tabs).
-## MD007 - Unordered list indentation
+## `MD007` - Unordered list indentation
-Tags: bullet, indentation, ul
+Tags: `bullet`, `indentation`, `ul`
-Aliases: ul-indent
+Aliases: `ul-indent`
Parameters:
@@ -347,11 +347,11 @@ Note: See [Prettier.md](Prettier.md) for compatibility information.
-## MD009 - Trailing spaces
+## `MD009` - Trailing spaces
-Tags: whitespace
+Tags: `whitespace`
-Aliases: no-trailing-spaces
+Aliases: `no-trailing-spaces`
Parameters:
@@ -398,11 +398,11 @@ has no purpose and does not affect the rendering of content.
-## MD010 - Hard tabs
+## `MD010` - Hard tabs
-Tags: hard_tab, whitespace
+Tags: `hard_tab`, `whitespace`
-Aliases: no-hard-tabs
+Aliases: `no-hard-tabs`
Parameters:
@@ -456,11 +456,11 @@ can be harder to work with than spaces.
-## MD011 - Reversed link syntax
+## `MD011` - Reversed link syntax
-Tags: links
+Tags: `links`
-Aliases: no-reversed-links
+Aliases: `no-reversed-links`
Fixable: Most violations can be fixed by tooling
@@ -489,11 +489,11 @@ Rationale: Reversed links are not rendered as usable links.
-## MD012 - Multiple consecutive blank lines
+## `MD012` - Multiple consecutive blank lines
-Tags: blank_lines, whitespace
+Tags: `blank_lines`, `whitespace`
-Aliases: no-multiple-blanks
+Aliases: `no-multiple-blanks`
Parameters:
@@ -530,11 +530,11 @@ affect the rendering of content.
-## MD013 - Line length
+## `MD013` - Line length
-Tags: line_length
+Tags: `line_length`
-Aliases: line-length
+Aliases: `line-length`
Parameters:
@@ -587,11 +587,11 @@ More information: .
-## MD014 - Dollar signs used before commands without showing output
+## `MD014` - Dollar signs used before commands without showing output
-Tags: code
+Tags: `code`
-Aliases: commands-show-output
+Aliases: `commands-show-output`
Fixable: Most violations can be fixed by tooling
@@ -644,11 +644,11 @@ for more information.
-## MD018 - No space after hash on atx style heading
+## `MD018` - No space after hash on atx style heading
-Tags: atx, headers, headings, spaces
+Tags: `atx`, `headers`, `headings`, `spaces`
-Aliases: no-missing-space-atx
+Aliases: `no-missing-space-atx`
Fixable: Most violations can be fixed by tooling
@@ -674,11 +674,11 @@ Rationale: Violations of this rule can lead to improperly rendered content.
-## MD019 - Multiple spaces after hash on atx style heading
+## `MD019` - Multiple spaces after hash on atx style heading
-Tags: atx, headers, headings, spaces
+Tags: `atx`, `headers`, `headings`, `spaces`
-Aliases: no-multiple-space-atx
+Aliases: `no-multiple-space-atx`
Fixable: Most violations can be fixed by tooling
@@ -705,11 +705,11 @@ content.
-## MD020 - No space inside hashes on closed atx style heading
+## `MD020` - No space inside hashes on closed atx style heading
-Tags: atx_closed, headers, headings, spaces
+Tags: `atx_closed`, `headers`, `headings`, `spaces`
-Aliases: no-missing-space-closed-atx
+Aliases: `no-missing-space-closed-atx`
Fixable: Most violations can be fixed by tooling
@@ -737,11 +737,11 @@ Rationale: Violations of this rule can lead to improperly rendered content.
-## MD021 - Multiple spaces inside hashes on closed atx style heading
+## `MD021` - Multiple spaces inside hashes on closed atx style heading
-Tags: atx_closed, headers, headings, spaces
+Tags: `atx_closed`, `headers`, `headings`, `spaces`
-Aliases: no-multiple-space-closed-atx
+Aliases: `no-multiple-space-closed-atx`
Fixable: Most violations can be fixed by tooling
@@ -771,11 +771,11 @@ content.
-## MD022 - Headings should be surrounded by blank lines
+## `MD022` - Headings should be surrounded by blank lines
-Tags: blank_lines, headers, headings
+Tags: `blank_lines`, `headers`, `headings`
-Aliases: blanks-around-headers, blanks-around-headings
+Aliases: `blanks-around-headers`, `blanks-around-headings`
Parameters:
@@ -820,11 +820,11 @@ regular text.
-## MD023 - Headings must start at the beginning of the line
+## `MD023` - Headings must start at the beginning of the line
-Tags: headers, headings, spaces
+Tags: `headers`, `headings`, `spaces`
-Aliases: header-start-left, heading-start-left
+Aliases: `header-start-left`, `heading-start-left`
Fixable: Most violations can be fixed by tooling
@@ -849,11 +849,11 @@ parsed as headings, and will instead appear as regular text.
-## MD024 - Multiple headings with the same content
+## `MD024` - Multiple headings with the same content
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: no-duplicate-header, no-duplicate-heading
+Aliases: `no-duplicate-header`, `no-duplicate-heading`
Parameters:
@@ -898,11 +898,11 @@ heading name; headings with the same content can cause problems with that.
-## MD025 - Multiple top-level headings in the same document
+## `MD025` - Multiple top-level headings in the same document
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: single-h1, single-title
+Aliases: `single-h1`, `single-title`
Parameters:
@@ -948,11 +948,11 @@ should be contained within this heading.
-## MD026 - Trailing punctuation in heading
+## `MD026` - Trailing punctuation in heading
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: no-trailing-punctuation
+Aliases: `no-trailing-punctuation`
Parameters:
@@ -989,11 +989,11 @@ Rationale: Headings are not meant to be full sentences. More information:
-## MD027 - Multiple spaces after blockquote symbol
+## `MD027` - Multiple spaces after blockquote symbol
-Tags: blockquote, indentation, whitespace
+Tags: `blockquote`, `indentation`, `whitespace`
-Aliases: no-multiple-space-blockquote
+Aliases: `no-multiple-space-blockquote`
Fixable: Most violations can be fixed by tooling
@@ -1016,11 +1016,11 @@ Rationale: Consistent formatting makes it easier to understand a document.
-## MD028 - Blank line inside blockquote
+## `MD028` - Blank line inside blockquote
-Tags: blockquote, whitespace
+Tags: `blockquote`, `whitespace`
-Aliases: no-blanks-blockquote
+Aliases: `no-blanks-blockquote`
This rule is triggered when two blockquote blocks are separated by nothing
except for a blank line:
@@ -1059,11 +1059,11 @@ separate blockquotes.
-## MD029 - Ordered list item prefix
+## `MD029` - Ordered list item prefix
-Tags: ol
+Tags: `ol`
-Aliases: ol-prefix
+Aliases: `ol-prefix`
Parameters:
@@ -1159,11 +1159,11 @@ Rationale: Consistent formatting makes it easier to understand a document.
-## MD030 - Spaces after list markers
+## `MD030` - Spaces after list markers
-Tags: ol, ul, whitespace
+Tags: `ol`, `ul`, `whitespace`
-Aliases: list-marker-space
+Aliases: `list-marker-space`
Parameters:
@@ -1241,11 +1241,11 @@ Note: See [Prettier.md](Prettier.md) for compatibility information.
-## MD031 - Fenced code blocks should be surrounded by blank lines
+## `MD031` - Fenced code blocks should be surrounded by blank lines
-Tags: blank_lines, code
+Tags: `blank_lines`, `code`
-Aliases: blanks-around-fences
+Aliases: `blanks-around-fences`
Parameters:
@@ -1294,11 +1294,11 @@ not parse fenced code blocks that don't have blank lines before and after them.
-## MD032 - Lists should be surrounded by blank lines
+## `MD032` - Lists should be surrounded by blank lines
-Tags: blank_lines, bullet, ol, ul
+Tags: `blank_lines`, `bullet`, `ol`, `ul`
-Aliases: blanks-around-lists
+Aliases: `blanks-around-lists`
Fixable: Most violations can be fixed by tooling
@@ -1335,11 +1335,11 @@ not parse lists that don't have blank lines before and after them.
-## MD033 - Inline HTML
+## `MD033` - Inline HTML
-Tags: html
+Tags: `html`
-Aliases: no-inline-html
+Aliases: `no-inline-html`
Parameters:
@@ -1365,11 +1365,11 @@ who are rendering Markdown documents into something other than HTML.
-## MD034 - Bare URL used
+## `MD034` - Bare URL used
-Tags: links, url
+Tags: `links`, `url`
-Aliases: no-bare-urls
+Aliases: `no-bare-urls`
Fixable: Most violations can be fixed by tooling
@@ -1412,11 +1412,11 @@ Markdown parsers.
-## MD035 - Horizontal rule style
+## `MD035` - Horizontal rule style
-Tags: hr
+Tags: `hr`
-Aliases: hr-style
+Aliases: `hr-style`
Parameters:
@@ -1457,11 +1457,11 @@ Rationale: Consistent formatting makes it easier to understand a document.
-## MD036 - Emphasis used instead of a heading
+## `MD036` - Emphasis used instead of a heading
-Tags: emphasis, headers, headings
+Tags: `emphasis`, `headers`, `headings`
-Aliases: no-emphasis-as-header, no-emphasis-as-heading
+Aliases: `no-emphasis-as-header`, `no-emphasis-as-heading`
Parameters:
@@ -1505,11 +1505,11 @@ the structure of a document. More information:
-## MD037 - Spaces inside emphasis markers
+## `MD037` - Spaces inside emphasis markers
-Tags: emphasis, whitespace
+Tags: `emphasis`, `whitespace`
-Aliases: no-space-in-emphasis
+Aliases: `no-space-in-emphasis`
Fixable: Most violations can be fixed by tooling
@@ -1545,11 +1545,11 @@ intended by the author.
-## MD038 - Spaces inside code span elements
+## `MD038` - Spaces inside code span elements
-Tags: code, whitespace
+Tags: `code`, `whitespace`
-Aliases: no-space-in-code
+Aliases: `no-space-in-code`
Fixable: Most violations can be fixed by tooling
@@ -1586,11 +1586,11 @@ Rationale: Violations of this rule can lead to improperly rendered content.
-## MD039 - Spaces inside link text
+## `MD039` - Spaces inside link text
-Tags: links, whitespace
+Tags: `links`, `whitespace`
-Aliases: no-space-in-links
+Aliases: `no-space-in-links`
Fixable: Most violations can be fixed by tooling
@@ -1610,11 +1610,11 @@ Rationale: Consistent formatting makes it easier to understand a document.
-## MD040 - Fenced code blocks should have a language specified
+## `MD040` - Fenced code blocks should have a language specified
-Tags: code, language
+Tags: `code`, `language`
-Aliases: fenced-code-language
+Aliases: `fenced-code-language`
Parameters:
@@ -1657,11 +1657,11 @@ correct syntax highlighting for code. More information:
-## MD041 - First line in a file should be a top-level heading
+## `MD041` - First line in a file should be a top-level heading
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: first-line-h1, first-line-heading
+Aliases: `first-line-h1`, `first-line-heading`
Parameters:
@@ -1707,11 +1707,11 @@ information: .
-## MD042 - No empty links
+## `MD042` - No empty links
-Tags: links
+Tags: `links`
-Aliases: no-empty-links
+Aliases: `no-empty-links`
This rule is triggered when an empty link is encountered:
@@ -1741,11 +1741,11 @@ Rationale: Empty links do not lead anywhere and therefore don't function as link
-## MD043 - Required heading structure
+## `MD043` - Required heading structure
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: required-headers, required-headings
+Aliases: `required-headers`, `required-headings`
Parameters:
@@ -1816,11 +1816,11 @@ a set of similar content.
-## MD044 - Proper names should have the correct capitalization
+## `MD044` - Proper names should have the correct capitalization
-Tags: spelling
+Tags: `spelling`
-Aliases: proper-names
+Aliases: `proper-names`
Parameters:
@@ -1853,11 +1853,11 @@ Rationale: Incorrect capitalization of proper names is usually a mistake.
-## MD045 - Images should have alternate text (alt text)
+## `MD045` - Images should have alternate text (alt text)
-Tags: accessibility, images
+Tags: `accessibility`, `images`
-Aliases: no-alt-text
+Aliases: `no-alt-text`
This rule is triggered when an image is missing alternate text (alt text) information.
@@ -1886,11 +1886,11 @@ content of an image for people who may not be able to see it.
-## MD046 - Code block style
+## `MD046` - Code block style
-Tags: code
+Tags: `code`
-Aliases: code-block-style
+Aliases: `code-block-style`
Parameters:
@@ -1927,11 +1927,11 @@ Rationale: Consistent formatting makes it easier to understand a document.
-## MD047 - Files should end with a single newline character
+## `MD047` - Files should end with a single newline character
-Tags: blank_lines
+Tags: `blank_lines`
-Aliases: single-trailing-newline
+Aliases: `single-trailing-newline`
Fixable: Most violations can be fixed by tooling
@@ -1960,11 +1960,11 @@ More information:
-## MD048 - Code fence style
+## `MD048` - Code fence style
-Tags: code
+Tags: `code`
-Aliases: code-fence-style
+Aliases: `code-fence-style`
Parameters:
@@ -2003,11 +2003,11 @@ Rationale: Consistent formatting makes it easier to understand a document.
-## MD049 - Emphasis style should be consistent
+## `MD049` - Emphasis style should be consistent
-Tags: emphasis
+Tags: `emphasis`
-Aliases: emphasis-style
+Aliases: `emphasis-style`
Parameters:
@@ -2037,11 +2037,11 @@ Rationale: Consistent formatting makes it easier to understand a document.
-## MD050 - Strong style should be consistent
+## `MD050` - Strong style should be consistent
-Tags: emphasis
+Tags: `emphasis`
-Aliases: strong-style
+Aliases: `strong-style`
Parameters:
@@ -2071,11 +2071,11 @@ Rationale: Consistent formatting makes it easier to understand a document.
-## MD051 - Link fragments should be valid
+## `MD051` - Link fragments should be valid
-Tags: links
+Tags: `links`
-Aliases: link-fragments
+Aliases: `link-fragments`
This rule is triggered when a link fragment does not correspond to a heading
in the document:
@@ -2109,11 +2109,11 @@ Note: Creating anchors for headings is not part of the CommonMark specification.
-## MD052 - Reference links and images should use a label that is defined
+## `MD052` - Reference links and images should use a label that is defined
-Tags: images, links
+Tags: `images`, `links`
-Aliases: reference-links-images
+Aliases: `reference-links-images`
Links and images in Markdown can provide the link destination or image source
at the time of use or can define it elsewhere and use a label for reference.
@@ -2145,11 +2145,11 @@ of undefined labels for "full" and "collapsed" reference syntax.
-## MD053 - Link and image reference definitions should be needed
+## `MD053` - Link and image reference definitions should be needed
-Tags: images, links
+Tags: `images`, `links`
-Aliases: link-image-reference-definitions
+Aliases: `link-image-reference-definitions`
Parameters:
diff --git a/doc/md001.md b/doc/md001.md
index 12cf4b95..eeb8811e 100644
--- a/doc/md001.md
+++ b/doc/md001.md
@@ -1,8 +1,8 @@
-# MD001 - Heading levels should only increment by one level at a time
+# `MD001` - Heading levels should only increment by one level at a time
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: header-increment, heading-increment
+Aliases: `header-increment`, `heading-increment`
This rule is triggered when you skip heading levels in a Markdown document, for
example:
diff --git a/doc/md002.md b/doc/md002.md
index c9f109a5..203a85d8 100644
--- a/doc/md002.md
+++ b/doc/md002.md
@@ -1,10 +1,10 @@
-# ~~MD002 - First heading should be a top-level heading~~
+# ~~`MD002` - First heading should be a top-level heading~~
> This rule is deprecated and provided for backward-compatibility
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: first-header-h1, first-heading-h1
+Aliases: `first-header-h1`, `first-heading-h1`
Parameters:
diff --git a/doc/md003.md b/doc/md003.md
index 49762d98..fa4e69d6 100644
--- a/doc/md003.md
+++ b/doc/md003.md
@@ -1,8 +1,8 @@
-# MD003 - Heading style
+# `MD003` - Heading style
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: header-style, heading-style
+Aliases: `header-style`, `heading-style`
Parameters:
diff --git a/doc/md004.md b/doc/md004.md
index 84b3746a..2f60cc48 100644
--- a/doc/md004.md
+++ b/doc/md004.md
@@ -1,8 +1,8 @@
-# MD004 - Unordered list style
+# `MD004` - Unordered list style
-Tags: bullet, ul
+Tags: `bullet`, `ul`
-Aliases: ul-style
+Aliases: `ul-style`
Parameters:
diff --git a/doc/md005.md b/doc/md005.md
index 4b41af43..66109f8d 100644
--- a/doc/md005.md
+++ b/doc/md005.md
@@ -1,8 +1,8 @@
-# MD005 - Inconsistent indentation for list items at the same level
+# `MD005` - Inconsistent indentation for list items at the same level
-Tags: bullet, indentation, ul
+Tags: `bullet`, `indentation`, `ul`
-Aliases: list-indent
+Aliases: `list-indent`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md006.md b/doc/md006.md
index 7d9d5aef..e9086294 100644
--- a/doc/md006.md
+++ b/doc/md006.md
@@ -1,10 +1,10 @@
-# ~~MD006 - Consider starting bulleted lists at the beginning of the line~~
+# ~~`MD006` - Consider starting bulleted lists at the beginning of the line~~
> This rule is deprecated and provided for backward-compatibility
-Tags: bullet, indentation, ul
+Tags: `bullet`, `indentation`, `ul`
-Aliases: ul-start-left
+Aliases: `ul-start-left`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md007.md b/doc/md007.md
index a8382b0c..0b5f011d 100644
--- a/doc/md007.md
+++ b/doc/md007.md
@@ -1,8 +1,8 @@
-# MD007 - Unordered list indentation
+# `MD007` - Unordered list indentation
-Tags: bullet, indentation, ul
+Tags: `bullet`, `indentation`, `ul`
-Aliases: ul-indent
+Aliases: `ul-indent`
Parameters:
diff --git a/doc/md009.md b/doc/md009.md
index f1c8ef34..35d829af 100644
--- a/doc/md009.md
+++ b/doc/md009.md
@@ -1,8 +1,8 @@
-# MD009 - Trailing spaces
+# `MD009` - Trailing spaces
-Tags: whitespace
+Tags: `whitespace`
-Aliases: no-trailing-spaces
+Aliases: `no-trailing-spaces`
Parameters:
diff --git a/doc/md010.md b/doc/md010.md
index 7712f6a9..ade98c3c 100644
--- a/doc/md010.md
+++ b/doc/md010.md
@@ -1,8 +1,8 @@
-# MD010 - Hard tabs
+# `MD010` - Hard tabs
-Tags: hard_tab, whitespace
+Tags: `hard_tab`, `whitespace`
-Aliases: no-hard-tabs
+Aliases: `no-hard-tabs`
Parameters:
diff --git a/doc/md011.md b/doc/md011.md
index 1572250c..1b208998 100644
--- a/doc/md011.md
+++ b/doc/md011.md
@@ -1,8 +1,8 @@
-# MD011 - Reversed link syntax
+# `MD011` - Reversed link syntax
-Tags: links
+Tags: `links`
-Aliases: no-reversed-links
+Aliases: `no-reversed-links`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md012.md b/doc/md012.md
index e8698dc0..7cde9d98 100644
--- a/doc/md012.md
+++ b/doc/md012.md
@@ -1,8 +1,8 @@
-# MD012 - Multiple consecutive blank lines
+# `MD012` - Multiple consecutive blank lines
-Tags: blank_lines, whitespace
+Tags: `blank_lines`, `whitespace`
-Aliases: no-multiple-blanks
+Aliases: `no-multiple-blanks`
Parameters:
diff --git a/doc/md013.md b/doc/md013.md
index bd964d39..1ef06e60 100644
--- a/doc/md013.md
+++ b/doc/md013.md
@@ -1,8 +1,8 @@
-# MD013 - Line length
+# `MD013` - Line length
-Tags: line_length
+Tags: `line_length`
-Aliases: line-length
+Aliases: `line-length`
Parameters:
diff --git a/doc/md014.md b/doc/md014.md
index cfe999a2..79871d5b 100644
--- a/doc/md014.md
+++ b/doc/md014.md
@@ -1,8 +1,8 @@
-# MD014 - Dollar signs used before commands without showing output
+# `MD014` - Dollar signs used before commands without showing output
-Tags: code
+Tags: `code`
-Aliases: commands-show-output
+Aliases: `commands-show-output`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md018.md b/doc/md018.md
index efdc5c85..a9a5cd21 100644
--- a/doc/md018.md
+++ b/doc/md018.md
@@ -1,8 +1,8 @@
-# MD018 - No space after hash on atx style heading
+# `MD018` - No space after hash on atx style heading
-Tags: atx, headers, headings, spaces
+Tags: `atx`, `headers`, `headings`, `spaces`
-Aliases: no-missing-space-atx
+Aliases: `no-missing-space-atx`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md019.md b/doc/md019.md
index 7b454d86..ed9eb263 100644
--- a/doc/md019.md
+++ b/doc/md019.md
@@ -1,8 +1,8 @@
-# MD019 - Multiple spaces after hash on atx style heading
+# `MD019` - Multiple spaces after hash on atx style heading
-Tags: atx, headers, headings, spaces
+Tags: `atx`, `headers`, `headings`, `spaces`
-Aliases: no-multiple-space-atx
+Aliases: `no-multiple-space-atx`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md020.md b/doc/md020.md
index 4080167a..fd979022 100644
--- a/doc/md020.md
+++ b/doc/md020.md
@@ -1,8 +1,8 @@
-# MD020 - No space inside hashes on closed atx style heading
+# `MD020` - No space inside hashes on closed atx style heading
-Tags: atx_closed, headers, headings, spaces
+Tags: `atx_closed`, `headers`, `headings`, `spaces`
-Aliases: no-missing-space-closed-atx
+Aliases: `no-missing-space-closed-atx`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md021.md b/doc/md021.md
index dbbaa4df..090e6d24 100644
--- a/doc/md021.md
+++ b/doc/md021.md
@@ -1,8 +1,8 @@
-# MD021 - Multiple spaces inside hashes on closed atx style heading
+# `MD021` - Multiple spaces inside hashes on closed atx style heading
-Tags: atx_closed, headers, headings, spaces
+Tags: `atx_closed`, `headers`, `headings`, `spaces`
-Aliases: no-multiple-space-closed-atx
+Aliases: `no-multiple-space-closed-atx`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md022.md b/doc/md022.md
index 2779a2a0..c4d27d78 100644
--- a/doc/md022.md
+++ b/doc/md022.md
@@ -1,8 +1,8 @@
-# MD022 - Headings should be surrounded by blank lines
+# `MD022` - Headings should be surrounded by blank lines
-Tags: blank_lines, headers, headings
+Tags: `blank_lines`, `headers`, `headings`
-Aliases: blanks-around-headers, blanks-around-headings
+Aliases: `blanks-around-headers`, `blanks-around-headings`
Parameters:
diff --git a/doc/md023.md b/doc/md023.md
index e5885c2b..dd88acc4 100644
--- a/doc/md023.md
+++ b/doc/md023.md
@@ -1,8 +1,8 @@
-# MD023 - Headings must start at the beginning of the line
+# `MD023` - Headings must start at the beginning of the line
-Tags: headers, headings, spaces
+Tags: `headers`, `headings`, `spaces`
-Aliases: header-start-left, heading-start-left
+Aliases: `header-start-left`, `heading-start-left`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md024.md b/doc/md024.md
index fa821b86..90917383 100644
--- a/doc/md024.md
+++ b/doc/md024.md
@@ -1,8 +1,8 @@
-# MD024 - Multiple headings with the same content
+# `MD024` - Multiple headings with the same content
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: no-duplicate-header, no-duplicate-heading
+Aliases: `no-duplicate-header`, `no-duplicate-heading`
Parameters:
diff --git a/doc/md025.md b/doc/md025.md
index 24dd5ff5..972faa3d 100644
--- a/doc/md025.md
+++ b/doc/md025.md
@@ -1,8 +1,8 @@
-# MD025 - Multiple top-level headings in the same document
+# `MD025` - Multiple top-level headings in the same document
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: single-h1, single-title
+Aliases: `single-h1`, `single-title`
Parameters:
diff --git a/doc/md026.md b/doc/md026.md
index d5188fc9..f0d41328 100644
--- a/doc/md026.md
+++ b/doc/md026.md
@@ -1,8 +1,8 @@
-# MD026 - Trailing punctuation in heading
+# `MD026` - Trailing punctuation in heading
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: no-trailing-punctuation
+Aliases: `no-trailing-punctuation`
Parameters:
diff --git a/doc/md027.md b/doc/md027.md
index 4d5a8105..a9ad4a80 100644
--- a/doc/md027.md
+++ b/doc/md027.md
@@ -1,8 +1,8 @@
-# MD027 - Multiple spaces after blockquote symbol
+# `MD027` - Multiple spaces after blockquote symbol
-Tags: blockquote, indentation, whitespace
+Tags: `blockquote`, `indentation`, `whitespace`
-Aliases: no-multiple-space-blockquote
+Aliases: `no-multiple-space-blockquote`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md028.md b/doc/md028.md
index 4bba169c..94972ed2 100644
--- a/doc/md028.md
+++ b/doc/md028.md
@@ -1,8 +1,8 @@
-# MD028 - Blank line inside blockquote
+# `MD028` - Blank line inside blockquote
-Tags: blockquote, whitespace
+Tags: `blockquote`, `whitespace`
-Aliases: no-blanks-blockquote
+Aliases: `no-blanks-blockquote`
This rule is triggered when two blockquote blocks are separated by nothing
except for a blank line:
diff --git a/doc/md029.md b/doc/md029.md
index c30c6462..2fd2b490 100644
--- a/doc/md029.md
+++ b/doc/md029.md
@@ -1,8 +1,8 @@
-# MD029 - Ordered list item prefix
+# `MD029` - Ordered list item prefix
-Tags: ol
+Tags: `ol`
-Aliases: ol-prefix
+Aliases: `ol-prefix`
Parameters:
diff --git a/doc/md030.md b/doc/md030.md
index d3a022ed..c1b1ff6b 100644
--- a/doc/md030.md
+++ b/doc/md030.md
@@ -1,8 +1,8 @@
-# MD030 - Spaces after list markers
+# `MD030` - Spaces after list markers
-Tags: ol, ul, whitespace
+Tags: `ol`, `ul`, `whitespace`
-Aliases: list-marker-space
+Aliases: `list-marker-space`
Parameters:
diff --git a/doc/md031.md b/doc/md031.md
index 0f215f2b..ba857e7d 100644
--- a/doc/md031.md
+++ b/doc/md031.md
@@ -1,8 +1,8 @@
-# MD031 - Fenced code blocks should be surrounded by blank lines
+# `MD031` - Fenced code blocks should be surrounded by blank lines
-Tags: blank_lines, code
+Tags: `blank_lines`, `code`
-Aliases: blanks-around-fences
+Aliases: `blanks-around-fences`
Parameters:
diff --git a/doc/md032.md b/doc/md032.md
index 2f424886..9f09e9b1 100644
--- a/doc/md032.md
+++ b/doc/md032.md
@@ -1,8 +1,8 @@
-# MD032 - Lists should be surrounded by blank lines
+# `MD032` - Lists should be surrounded by blank lines
-Tags: blank_lines, bullet, ol, ul
+Tags: `blank_lines`, `bullet`, `ol`, `ul`
-Aliases: blanks-around-lists
+Aliases: `blanks-around-lists`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md033.md b/doc/md033.md
index 82fbefe5..3da981ea 100644
--- a/doc/md033.md
+++ b/doc/md033.md
@@ -1,8 +1,8 @@
-# MD033 - Inline HTML
+# `MD033` - Inline HTML
-Tags: html
+Tags: `html`
-Aliases: no-inline-html
+Aliases: `no-inline-html`
Parameters:
diff --git a/doc/md034.md b/doc/md034.md
index 446f27ed..c5666bee 100644
--- a/doc/md034.md
+++ b/doc/md034.md
@@ -1,8 +1,8 @@
-# MD034 - Bare URL used
+# `MD034` - Bare URL used
-Tags: links, url
+Tags: `links`, `url`
-Aliases: no-bare-urls
+Aliases: `no-bare-urls`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md035.md b/doc/md035.md
index 64dae8f6..961e59e1 100644
--- a/doc/md035.md
+++ b/doc/md035.md
@@ -1,8 +1,8 @@
-# MD035 - Horizontal rule style
+# `MD035` - Horizontal rule style
-Tags: hr
+Tags: `hr`
-Aliases: hr-style
+Aliases: `hr-style`
Parameters:
diff --git a/doc/md036.md b/doc/md036.md
index 7602315e..bc986c3a 100644
--- a/doc/md036.md
+++ b/doc/md036.md
@@ -1,8 +1,8 @@
-# MD036 - Emphasis used instead of a heading
+# `MD036` - Emphasis used instead of a heading
-Tags: emphasis, headers, headings
+Tags: `emphasis`, `headers`, `headings`
-Aliases: no-emphasis-as-header, no-emphasis-as-heading
+Aliases: `no-emphasis-as-header`, `no-emphasis-as-heading`
Parameters:
diff --git a/doc/md037.md b/doc/md037.md
index 06900ac2..aa002190 100644
--- a/doc/md037.md
+++ b/doc/md037.md
@@ -1,8 +1,8 @@
-# MD037 - Spaces inside emphasis markers
+# `MD037` - Spaces inside emphasis markers
-Tags: emphasis, whitespace
+Tags: `emphasis`, `whitespace`
-Aliases: no-space-in-emphasis
+Aliases: `no-space-in-emphasis`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md038.md b/doc/md038.md
index 3c1fdf1a..21c57ecf 100644
--- a/doc/md038.md
+++ b/doc/md038.md
@@ -1,8 +1,8 @@
-# MD038 - Spaces inside code span elements
+# `MD038` - Spaces inside code span elements
-Tags: code, whitespace
+Tags: `code`, `whitespace`
-Aliases: no-space-in-code
+Aliases: `no-space-in-code`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md039.md b/doc/md039.md
index f95dbf36..06b7810a 100644
--- a/doc/md039.md
+++ b/doc/md039.md
@@ -1,8 +1,8 @@
-# MD039 - Spaces inside link text
+# `MD039` - Spaces inside link text
-Tags: links, whitespace
+Tags: `links`, `whitespace`
-Aliases: no-space-in-links
+Aliases: `no-space-in-links`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md040.md b/doc/md040.md
index be1676c8..1a21f218 100644
--- a/doc/md040.md
+++ b/doc/md040.md
@@ -1,8 +1,8 @@
-# MD040 - Fenced code blocks should have a language specified
+# `MD040` - Fenced code blocks should have a language specified
-Tags: code, language
+Tags: `code`, `language`
-Aliases: fenced-code-language
+Aliases: `fenced-code-language`
Parameters:
diff --git a/doc/md041.md b/doc/md041.md
index cfcc84fe..4c643813 100644
--- a/doc/md041.md
+++ b/doc/md041.md
@@ -1,8 +1,8 @@
-# MD041 - First line in a file should be a top-level heading
+# `MD041` - First line in a file should be a top-level heading
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: first-line-h1, first-line-heading
+Aliases: `first-line-h1`, `first-line-heading`
Parameters:
diff --git a/doc/md042.md b/doc/md042.md
index 6f5e2100..2b89eb90 100644
--- a/doc/md042.md
+++ b/doc/md042.md
@@ -1,8 +1,8 @@
-# MD042 - No empty links
+# `MD042` - No empty links
-Tags: links
+Tags: `links`
-Aliases: no-empty-links
+Aliases: `no-empty-links`
This rule is triggered when an empty link is encountered:
diff --git a/doc/md043.md b/doc/md043.md
index 51e260f2..97512eee 100644
--- a/doc/md043.md
+++ b/doc/md043.md
@@ -1,8 +1,8 @@
-# MD043 - Required heading structure
+# `MD043` - Required heading structure
-Tags: headers, headings
+Tags: `headers`, `headings`
-Aliases: required-headers, required-headings
+Aliases: `required-headers`, `required-headings`
Parameters:
diff --git a/doc/md044.md b/doc/md044.md
index 24c99ac7..2a936e6b 100644
--- a/doc/md044.md
+++ b/doc/md044.md
@@ -1,8 +1,8 @@
-# MD044 - Proper names should have the correct capitalization
+# `MD044` - Proper names should have the correct capitalization
-Tags: spelling
+Tags: `spelling`
-Aliases: proper-names
+Aliases: `proper-names`
Parameters:
diff --git a/doc/md045.md b/doc/md045.md
index 0f7c82f3..8baf6c1b 100644
--- a/doc/md045.md
+++ b/doc/md045.md
@@ -1,8 +1,8 @@
-# MD045 - Images should have alternate text (alt text)
+# `MD045` - Images should have alternate text (alt text)
-Tags: accessibility, images
+Tags: `accessibility`, `images`
-Aliases: no-alt-text
+Aliases: `no-alt-text`
This rule is triggered when an image is missing alternate text (alt text) information.
diff --git a/doc/md046.md b/doc/md046.md
index 85ed43ce..f2310e1a 100644
--- a/doc/md046.md
+++ b/doc/md046.md
@@ -1,8 +1,8 @@
-# MD046 - Code block style
+# `MD046` - Code block style
-Tags: code
+Tags: `code`
-Aliases: code-block-style
+Aliases: `code-block-style`
Parameters:
diff --git a/doc/md047.md b/doc/md047.md
index 3f4ddefa..4d8db5aa 100644
--- a/doc/md047.md
+++ b/doc/md047.md
@@ -1,8 +1,8 @@
-# MD047 - Files should end with a single newline character
+# `MD047` - Files should end with a single newline character
-Tags: blank_lines
+Tags: `blank_lines`
-Aliases: single-trailing-newline
+Aliases: `single-trailing-newline`
Fixable: Most violations can be fixed by tooling
diff --git a/doc/md048.md b/doc/md048.md
index 148292c1..3902ed04 100644
--- a/doc/md048.md
+++ b/doc/md048.md
@@ -1,8 +1,8 @@
-# MD048 - Code fence style
+# `MD048` - Code fence style
-Tags: code
+Tags: `code`
-Aliases: code-fence-style
+Aliases: `code-fence-style`
Parameters:
diff --git a/doc/md049.md b/doc/md049.md
index 289cb410..93de1c93 100644
--- a/doc/md049.md
+++ b/doc/md049.md
@@ -1,8 +1,8 @@
-# MD049 - Emphasis style should be consistent
+# `MD049` - Emphasis style should be consistent
-Tags: emphasis
+Tags: `emphasis`
-Aliases: emphasis-style
+Aliases: `emphasis-style`
Parameters:
diff --git a/doc/md050.md b/doc/md050.md
index f61993ee..f02292d5 100644
--- a/doc/md050.md
+++ b/doc/md050.md
@@ -1,8 +1,8 @@
-# MD050 - Strong style should be consistent
+# `MD050` - Strong style should be consistent
-Tags: emphasis
+Tags: `emphasis`
-Aliases: strong-style
+Aliases: `strong-style`
Parameters:
diff --git a/doc/md051.md b/doc/md051.md
index 18df2112..c0f7b55d 100644
--- a/doc/md051.md
+++ b/doc/md051.md
@@ -1,8 +1,8 @@
-# MD051 - Link fragments should be valid
+# `MD051` - Link fragments should be valid
-Tags: links
+Tags: `links`
-Aliases: link-fragments
+Aliases: `link-fragments`
This rule is triggered when a link fragment does not correspond to a heading
in the document:
diff --git a/doc/md052.md b/doc/md052.md
index fb6e678c..be02b7cc 100644
--- a/doc/md052.md
+++ b/doc/md052.md
@@ -1,8 +1,8 @@
-# MD052 - Reference links and images should use a label that is defined
+# `MD052` - Reference links and images should use a label that is defined
-Tags: images, links
+Tags: `images`, `links`
-Aliases: reference-links-images
+Aliases: `reference-links-images`
Links and images in Markdown can provide the link destination or image source
at the time of use or can define it elsewhere and use a label for reference.
diff --git a/doc/md053.md b/doc/md053.md
index e2a23b12..dc39938a 100644
--- a/doc/md053.md
+++ b/doc/md053.md
@@ -1,8 +1,8 @@
-# MD053 - Link and image reference definitions should be needed
+# `MD053` - Link and image reference definitions should be needed
-Tags: images, links
+Tags: `images`, `links`
-Aliases: link-image-reference-definitions
+Aliases: `link-image-reference-definitions`
Parameters:
diff --git a/test/markdownlint-test.js b/test/markdownlint-test.js
index 3800a21e..5c1abc93 100644
--- a/test/markdownlint-test.js
+++ b/test/markdownlint-test.js
@@ -912,7 +912,7 @@ test("readme", (t) => new Promise((resolve) => {
}
} else if (inTags) {
const parts =
- token.content.replace(/\*\*/g, "").split(/ - |, |,\n/);
+ token.content.replace(/[`*]/g, "").split(/ - |, |,\n/);
const tag = parts.shift();
t.deepEqual(parts, tagToRules[tag] || [],
"Rule mismatch for tag " + tag + ".");