├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── config.yml
│ └── markdownlint-issue-template.md
├── codeql-config.yaml
├── dependabot.yml
├── dictionary.txt
└── workflows
│ ├── checkers.yml
│ ├── ci.yml
│ ├── codeql-analysis.yml
│ └── test-repos.yml
├── .gitignore
├── .markdownlint.json
├── .npmignore
├── .npmrc
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── demo
├── browser-exports.mjs
├── default.css
├── default.htm
├── default.js
├── favicon.ico
├── favicon.svg
└── webpack.config.mjs
├── doc-build
├── .markdownlint.jsonc
├── build-rules.mjs
├── footing.md
├── heading.md
├── md001.md
├── md003.md
├── md004.md
├── md005.md
├── md007.md
├── md009.md
├── md010.md
├── md011.md
├── md012.md
├── md013.md
├── md014.md
├── md018.md
├── md019.md
├── md020.md
├── md021.md
├── md022.md
├── md023.md
├── md024.md
├── md025.md
├── md026.md
├── md027.md
├── md028.md
├── md029.md
├── md030.md
├── md031.md
├── md032.md
├── md033.md
├── md034.md
├── md035.md
├── md036.md
├── md037.md
├── md038.md
├── md039.md
├── md040.md
├── md041.md
├── md042.md
├── md043.md
├── md044.md
├── md045.md
├── md046.md
├── md047.md
├── md048.md
├── md049.md
├── md050.md
├── md051.md
├── md052.md
├── md053.md
├── md054.md
├── md055.md
├── md056.md
├── md058.md
└── md059.md
├── doc
├── CustomRules.md
├── Prettier.md
├── ReleaseProcess.md
├── Rules.md
├── md001.md
├── md003.md
├── md004.md
├── md005.md
├── md007.md
├── md009.md
├── md010.md
├── md011.md
├── md012.md
├── md013.md
├── md014.md
├── md018.md
├── md019.md
├── md020.md
├── md021.md
├── md022.md
├── md023.md
├── md024.md
├── md025.md
├── md026.md
├── md027.md
├── md028.md
├── md029.md
├── md030.md
├── md031.md
├── md032.md
├── md033.md
├── md034.md
├── md035.md
├── md036.md
├── md037.md
├── md038.md
├── md039.md
├── md040.md
├── md041.md
├── md042.md
├── md043.md
├── md044.md
├── md045.md
├── md046.md
├── md047.md
├── md048.md
├── md049.md
├── md050.md
├── md051.md
├── md052.md
├── md053.md
├── md054.md
├── md055.md
├── md056.md
├── md058.md
└── md059.md
├── eslint.config.mjs
├── example
├── Gruntfile.cjs
├── bad.md
├── good.md
├── gulpfile.cjs
├── standalone.mjs
└── typescript
│ ├── .gitignore
│ ├── tsconfig.json
│ └── type-check.ts
├── helpers
├── .npmignore
├── LICENSE
├── README.md
├── helpers.cjs
├── micromark-helpers.cjs
├── package.json
├── shared.cjs
└── test.cjs
├── lib
├── cache.mjs
├── configuration-strict.d.ts
├── configuration.d.ts
├── constants.mjs
├── defer-require.cjs
├── exports-async.d.mts
├── exports-async.mjs
├── exports-promise.d.mts
├── exports-promise.mjs
├── exports-sync.d.mts
├── exports-sync.mjs
├── exports.d.mts
├── exports.mjs
├── markdownit.cjs
├── markdownlint.d.mts
├── markdownlint.mjs
├── md001.mjs
├── md003.mjs
├── md004.mjs
├── md005.mjs
├── md007.mjs
├── md009.mjs
├── md010.mjs
├── md011.mjs
├── md012.mjs
├── md013.mjs
├── md014.mjs
├── md018.mjs
├── md019-md021.mjs
├── md020.mjs
├── md022.mjs
├── md023.mjs
├── md024.mjs
├── md025.mjs
├── md026.mjs
├── md027.mjs
├── md028.mjs
├── md029.mjs
├── md030.mjs
├── md031.mjs
├── md032.mjs
├── md033.mjs
├── md034.mjs
├── md035.mjs
├── md036.mjs
├── md037.mjs
├── md038.mjs
├── md039.mjs
├── md040.mjs
├── md041.mjs
├── md042.mjs
├── md043.mjs
├── md044.mjs
├── md045.mjs
├── md046.mjs
├── md047.mjs
├── md048.mjs
├── md049-md050.mjs
├── md051.mjs
├── md052.mjs
├── md053.mjs
├── md054.mjs
├── md055.mjs
├── md056.mjs
├── md058.mjs
├── md059.mjs
├── micromark-parse.mjs
├── micromark-types.d.mts
├── node-imports-browser.mjs
├── node-imports-node.mjs
├── parse-configuration.mjs
├── resolve-module.cjs
├── resolve-module.d.cts
├── rules.mjs
└── types.d.mts
├── package.json
├── schema
├── .markdownlint.jsonc
├── .markdownlint.yaml
├── ValidatingConfiguration.md
├── build-config-example.mjs
├── build-config-schema.mjs
├── markdownlint-config-schema-strict.json
└── markdownlint-config-schema.json
├── scripts
└── index.mjs
├── style
├── all.json
├── cirosantilli.json
├── prettier.json
└── relaxed.json
└── test
├── .markdownlint.json
├── 4-tabs-MD010.md
├── MD001-MD010.md
├── MD011-MD021.md
├── MD022-MD030.md
├── MD030-warning-message.md
├── MD031-MD040.md
├── MD041-MD050.md
├── MD051-MD060.md
├── alternate_top_level_heading.md
├── atx-heading-spacing-trailing-spaces.md
├── atx_closed_heading_spacing.md
├── atx_heading_spacing.md
├── backslashes-and-backticks.md
├── bare-list-markers.md
├── bare-urls-in-html.md
├── bare-urls.md
├── blanks-around-fences-in-lists.md
├── blanks-around-headings--1-1.md
├── blanks-around-headings-0-2.md
├── blanks-around-headings-1--1.md
├── blanks-around-headings-3-0.md
├── blanks-around-headings-arrays.md
├── blanks-around-headings.md
├── blanks-around-tables.md
├── blanks-around.md
├── blockquote-headings.md
├── blockquote-spaces-nested.md
├── blockquote_blank_lines.md
├── blockquote_spaces.md
├── break-all-the-rules.md
├── bulleted_list_2_space_indent.md
├── bulleted_list_4_space_indent.md
├── bulleted_list_not_at_beginning_of_line.md
├── byte-order-marker-utf8.md
├── code-block-in-list.md
├── code-block-trailing-spaces.md
├── code-block-with-language-allowed.md
├── code-block-with-tabs-allowed.md
├── code-block-with-tabs.md
├── code-blocks-and-spans.md
├── code-blocks-prefixed-by-spaces.md
├── code-fences-in-blockquotes.md
├── code-with-tabs-allowed.md
├── code-with-tabs-blocked.md
├── code_block_consistency.md
├── code_block_dollar.md
├── code_block_dollar_fence-empty.md
├── code_block_dollar_fence.md
├── code_block_fenced.md
├── code_block_indented.md
├── code_fence_style_backtick.md
├── code_fence_style_tilde.md
├── config
├── config-badchildfile.json
├── config-badchildjson.json
├── config-badchildpackage.json
├── config-badcontent.txt
├── config-badjson.json
├── config-child.json
├── config-child.yaml
├── config-grandparent-hybrid.yaml
├── config-grandparent.json
├── config-grandparent.yaml
├── config-packageparent.json
├── config-parent-hybrid.toml
├── config-parent.json
└── config-parent.yaml
├── consecutive_blank_lines.md
├── consistent_bullet_styles_asterisk.md
├── consistent_bullet_styles_dash.md
├── consistent_bullet_styles_plus.md
├── custom-rules.md
├── default-spaces-MD010.md
├── descriptive-link-text-empty-config.md
├── descriptive-link-text-override.md
├── descriptive-link-text.md
├── docfx-tab-syntax.md
├── emoji-headings.md
├── emphasis-markers.md
├── emphasis-not-heading-in-blockquote.md
├── emphasis_instead_of_headings.md
├── emphasis_style_asterisk.md
├── emphasis_style_underscore.md
├── empty-links.md
├── empty_doc.md
├── escaped-emphasis-markers.md
├── esm-helpers.mjs
├── every-markdown-syntax.md
├── fenced-code-in-list.md
├── fenced-code-unmatched.md
├── fenced_code_blocks.md
├── fenced_code_blocks_in_lists.md
├── fenced_code_with_nesting.md
├── fenced_code_without_blank_lines.md
├── first-line-heading-allow-preamble-false.md
├── first-line-heading-allow-preamble-h1.md
├── first-line-heading-allow-preamble-violation.md
├── first-line-heading-allow-preamble.md
├── first_heading_bad_atx.md
├── first_heading_bad_setext.md
├── first_heading_good_atx.md
├── first_heading_good_setext.md
├── first_line_top_level_heading_atx.md
├── first_line_top_level_heading_setext.md
├── fix_102_extra_nodes_in_link_text.md
├── fixing-with-front-matter.md
├── front-matter-alt-title-h1.md
├── front-matter-alt-title-json.md
├── front-matter-alt-title-no-h1.md
├── front-matter-alt-title-toml.md
├── front-matter-alternate.md
├── front-matter-embedded.md
├── front-matter-empty-title-no-h1.md
├── front-matter-empty.md
├── front-matter-no-crlf.md
├── front-matter-no-title-h1.md
├── front-matter-no-title-no-h1.md
├── front-matter-title-h1.md
├── front-matter-title-h2.md
├── front-matter-title-json-spaces.md
├── front-matter-title-json.md
├── front-matter-title-no-h1.md
├── front-matter-title-pandoc-spaces.md
├── front-matter-title-pandoc.md
├── front-matter-title-spaces.md
├── front-matter-title-toml-spaces.md
├── front-matter-title-toml.md
├── front-matter-with-dashes.md
├── front-matter-with-disable-next-line.md
├── front-matter-yaml-in-html-comment.md
├── front-matter.md
├── github-footnote-syntax.md
├── h1-as-top-level-heading.md
├── h1-image-as-top-level-heading.md
├── h2-as-top-level-heading.md
├── h3-as-top-level-heading.md
├── hard-line-breaks.md
├── harness.mjs
├── heading-duplicate-content-siblings-only.md
├── heading-multiple-top-level-preceding-blank-and-comment.md
├── heading-multiple-top-level-preceding-blank.md
├── heading-multiple-top-level-preceding-comment.md
├── heading_duplicate_content.md
├── heading_duplicate_content_different_nesting.md
├── heading_duplicate_content_no_different_nesting.md
├── heading_multiple_toplevel.md
├── heading_mutliple_h1_no_toplevel.md
├── heading_trailing_punctuation.md
├── heading_trailing_punctuation_customized.md
├── heading_trailing_punctuation_empty.md
├── headings-with-emoji.md
├── headings-with-html-entities.md
├── headings-with-invalid-spaces.md
├── headings-without-content.md
├── headings_bad.md
├── headings_good.md
├── headings_good_setext_with_atx.md
├── headings_good_setext_with_atx_closed.md
├── headings_good_with_issue_numbers.md
├── headings_surrounding_space_atx.md
├── headings_surrounding_space_setext.md
├── headings_with_spaces_at_the_beginning.md
├── hr-in-blockquote-dash.md
├── hr-in-blockquote-star.md
├── hr-in-blockquote-under.md
├── hr-in-list-dash.md
├── hr-in-list-star.md
├── hr-in-list-under.md
├── hr-style-custom.md
├── hr_style_dashes.md
├── hr_style_inconsistent.md
├── hr_style_long.md
├── hr_style_stars.md
├── html-comment-in-code-and-table.md
├── html-comment-in-list-item.md
├── html-comment-in-markdown-table.md
├── html-comments.md
├── html-tags.md
├── hugo-quickstart-example-blank.md
├── hugo-quickstart-example-clean.md
├── hugo-quickstart-example-json.md
├── ignore-comments.md
├── ignore-html-block.md
├── inconsistent_bullet_indent_same_level.md
├── inconsistent_bullet_styles_asterisk.md
├── inconsistent_bullet_styles_dash.md
├── inconsistent_bullet_styles_plus.md
├── incorrect_bullet_style_asterisk.md
├── incorrect_bullet_style_dash.md
├── incorrect_bullet_style_plus.md
├── incorrect_heading_atx.md
├── incorrect_heading_atx_closed.md
├── incorrect_heading_setext.md
├── inline-capture-restore.md
├── inline-configure-file-invalid.md
├── inline-configure-file-multiple-instances.md
├── inline-configure-file-multiple-lines.md
├── inline-configure-file-single-line.md
├── inline-configure-file-violations.md
├── inline-disable-enable-file.md
├── inline-disable-enable.md
├── inline_html-allowed_elements.md
├── inline_html.md
├── invalid-ul-style-style.md
├── jekyll_post.md
├── jekyll_post_2.md
├── line-breaks-inside-code-spans.md
├── link-fragments-default-case.md
├── link-fragments-ignore-case.md
├── link-fragments-ignored-pattern-default.md
├── link-fragments-ignored-pattern-empty.md
├── link-fragments-ignored-pattern-multiple.md
├── link-fragments-ignored-pattern-present.md
├── link-fragments.md
├── link-style-autolink-only.md
├── link-style-autolink-or-inline.md
├── link-style-autolink-or-reference.md
├── link-style-collapsed-only.md
├── link-style-full-only.md
├── link-style-inline-only.md
├── link-style-inline-or-reference.md
├── link-style-no-url-inline-not-possible.md
├── link-style-no-url-inline-possible.md
├── link-style-none.md
├── link-style-reference-only.md
├── link-style-shortcut-only.md
├── links-alternate.md
├── links-with-markup.md
├── links.md
├── lint-javascript.md
├── list-indentation-start-indent-indent.md
├── list-indentation-start-indent-no-indent.md
├── list-indentation-start-indented-indent.md
├── list-indentation-start-indented-no-indent.md
├── list-indentation.md
├── list-item-prefix-alignment.md
├── list-syntax-in-paragraph-text.md
├── lists-and-headings.md
├── lists-in-blockquote-normal-indent.md
├── lists-in-blockquote-start-indented-no-list-items.md
├── lists-in-blockquote-start-indented.md
├── lists-in-blockquote.md
├── lists-incomplete.md
├── lists-on-a-line.md
├── lists-with-commented-items.md
├── lists-with-fenced-code-tight.md
├── lists-with-fenced-code.md
├── lists-with-nesting.md
├── lists_without_blank_lines.md
├── long-heading-exceptions.md
├── long-lines-long-reference-definitions-stern.md
├── long-lines-long-reference-definitions-strict.md
├── long-lines-long-reference-definitions.md
├── long-lines-short-code.md
├── long-lines-short-headings.md
├── long-lines-stern.md
├── long-lines-strict.md
├── long_lines.md
├── long_lines_100.md
├── long_lines_code-default.md
├── long_lines_code.md
├── markdown-extra-footnote.md
├── markdown-in-html.md
├── markdownlint-test-config.mjs
├── markdownlint-test-custom-rules.mjs
├── markdownlint-test-exports.mjs
├── markdownlint-test-extra-parse.mjs
├── markdownlint-test-extra-type.mjs
├── markdownlint-test-fixes.mjs
├── markdownlint-test-helpers.mjs
├── markdownlint-test-micromark.mjs
├── markdownlint-test-parallel.mjs
├── markdownlint-test-project.mjs
├── markdownlint-test-repos-dotnet-docs.mjs
├── markdownlint-test-repos-mdn-content.mjs
├── markdownlint-test-repos-small.mjs
├── markdownlint-test-repos.mjs
├── markdownlint-test-result-object.mjs
├── markdownlint-test-scenarios.mjs
├── markdownlint-test-worker.mjs
├── markdownlint-test.mjs
├── mathjax-scenarios.md
├── md003-escaped-trailing-hash.md
├── md004-list-items-in-blockquote.md
├── md022-line-number-out-of-range.md
├── md033-cannot-read-property-of-undefined.md
├── md036-emphasis-as-heading.md
├── md038-scenarios.md
├── md040-allowed_languages.md
├── md040-language_only.md
├── md041-ignore-leading-comments-combined.md
├── md041-ignore-leading-comments-violation.md
├── md041-ignore-leading-comments.md
├── md041-yaml-title-and-first-line-heading.md
├── md052-invalid-range-bug.md
├── micromark-regressions.md
├── mixed-emphasis-markers.md
├── mixed_heading_types_atx.md
├── mixed_heading_types_atx_closed.md
├── mixed_heading_types_setext.md
├── no-alt-text.md
├── no-multiple-blanks-maximum.md
├── no-multiple-blanks.md
├── no-tabs-edge-case-MD010.md
├── no_first_line_heading.md
├── no_first_line_top_level_heading.md
├── node_modules
└── pseudo-package
│ ├── config-frompackage.json
│ └── package.json
├── ordered-list-item-prefix-one.md
├── ordered-list-item-prefix-one_or_ordered.md
├── ordered-list-item-prefix-ordered.md
├── ordered-list-item-prefix-single-alternate.md
├── ordered-list-item-prefix-zero-alternate.md
├── ordered-list-item-prefix-zero.md
├── ordered_list_item_prefix-paren.md
├── ordered_list_item_prefix.md
├── ordered_list_item_prefix_ordered-paren.md
├── ordered_list_item_prefix_ordered.md
├── pandoc-footnotes.md
├── parse-configuration-test.mjs
├── prettier-tab-width-2-default.md
├── prettier-tab-width-4.md
├── profile-fixture.mjs
├── proper-names-alternate.md
├── proper-names-links.md
├── proper-names-no-code.md
├── proper-names-no-html.md
├── proper-names-non-word-boundaries.md
├── proper-names-projects.md
├── proper-names-substrings.md
├── proper-names-urls.md
├── proper-names.md
├── reference-links-and-images-ignored-labels-empty.md
├── reference-links-and-images-ignored-labels.md
├── reference-links-and-images-shortcuts.md
├── reference-links-and-images.md
├── reference-links-ignored-definitions-empty.md
├── reference-links-ignored-definitions.md
├── required-headings-all-optional-at-least-one.md
├── required-headings-all-optional.md
├── required-headings-all-present.md
├── required-headings-match-case.md
├── required-headings-missing-first.md
├── required-headings-missing-last-zero-or-more.md
├── required-headings-missing-last.md
├── required-headings-missing-middle-zero-or-more.md
├── required-headings-missing-middle.md
├── required-headings-none-one-or-more.md
├── required-headings-none-zero-or-more.md
├── required-headings-none.md
├── required-headings-one-or-more.md
├── required-headings-optional-first.md
├── required-headings-optional-last.md
├── required-headings-optional-middle.md
├── required-headings-optional-redundant.md
├── required-headings-question-extra.md
├── required-headings-question-first.md
├── required-headings-question-last.md
├── required-headings-question-middle.md
├── required-headings-question-missing.md
├── required-headings-wrong-match-case.md
├── required-headings-zero-or-more-last.md
├── required-headings-zero-or-more.md
├── resolve-module-test.mjs
├── reversed-link-issue-with-markdownlint-12.md
├── reversed_link.md
├── rules
├── any-blockquote.cjs
├── every-n-lines.cjs
├── first-line.cjs
├── letters-E-X.cjs
├── lint-javascript.cjs
├── node_modules
│ ├── markdownlint-rule-sample-commonjs
│ │ ├── package.json
│ │ └── sample-rule.cjs
│ └── markdownlint-rule-sample-module
│ │ ├── package.json
│ │ └── sample-rule.mjs
├── npm
│ ├── package.json
│ └── sample-rule.js
├── rules.cjs
└── validate-json.cjs
├── short-headings.md
├── simple-table.md
├── snapshots
├── markdownlint-test-custom-rules.mjs.md
├── markdownlint-test-custom-rules.mjs.snap
├── markdownlint-test-exports.mjs.md
├── markdownlint-test-exports.mjs.snap
├── markdownlint-test-micromark.mjs.md
├── markdownlint-test-micromark.mjs.snap
├── markdownlint-test-repos-dotnet-docs.mjs.md
├── markdownlint-test-repos-dotnet-docs.mjs.snap
├── markdownlint-test-repos-mdn-content.mjs.md
├── markdownlint-test-repos-mdn-content.mjs.snap
├── markdownlint-test-repos-small.mjs.md
├── markdownlint-test-repos-small.mjs.snap
├── markdownlint-test-scenarios.mjs.md
└── markdownlint-test-scenarios.mjs.snap
├── spaces-inside-emphasis-markers-multiple-lines.md
├── spaces-inside-link-text.md
├── spaces_after_list_marker.md
├── spaces_inside_codespan_elements.md
├── spaces_inside_emphasis_markers.md
├── spaces_inside_link_text.md
├── strong_style_asterisk.md
├── strong_style_underscore.md
├── sublist-bullet-style.md
├── table-column-count.md
├── table-content-with-issues.md
├── table-issue-with-markdown-it-12.md
├── table-pipe-style-explicit-both.md
├── table-pipe-style-explicit-leading.md
├── table-pipe-style-explicit-none.md
├── table-pipe-style-explicit-trailing.md
├── table-pipe-style-implicit-both.md
├── table-pipe-style-implicit-leading.md
├── table-pipe-style-implicit-none.md
├── table-pipe-style-implicit-trailing.md
├── table-pipe-style.md
├── texmath-content-in-lists.md
├── texmath-content.md
├── token-map-spans.md
├── trailing-spaces-in-lists-allowed-strict.md
├── trailing-spaces-in-lists-allowed.md
├── trailing-spaces-in-lists-default.md
├── trailing_spaces_br.md
├── unclosed-html-comment-in-code-span.md
├── unclosed-html-comment.md
├── unterminated-html-comment.md
├── validate-json.md
├── whitespace_issues.md
└── wrong-types-in-config-file.md
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: DavidAnson
2 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 |
--------------------------------------------------------------------------------
/.github/codeql-config.yaml:
--------------------------------------------------------------------------------
1 | name: "CodeQL Config"
2 |
3 | queries:
4 | - uses: security-and-quality
5 |
6 | paths-ignore:
7 | - demo/markdownlint-browser.js
8 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "github-actions"
4 | directory: "/"
5 | schedule:
6 | interval: "daily"
7 | target-branch: "next"
8 | - package-ecosystem: "npm"
9 | directory: "/"
10 | schedule:
11 | interval: "daily"
12 | target-branch: "next"
13 | versioning-strategy: "increase"
14 |
--------------------------------------------------------------------------------
/.github/workflows/checkers.yml:
--------------------------------------------------------------------------------
1 | name: Checkers
2 |
3 | on:
4 | pull_request:
5 | push:
6 | branches-ignore:
7 | - 'dependabot/**'
8 | workflow_dispatch:
9 |
10 | jobs:
11 |
12 | linkcheck:
13 | runs-on: ubuntu-latest
14 | steps:
15 | - uses: actions/checkout@v4
16 | - uses: JustinBeckwith/linkinator-action@v1.11.0
17 | with:
18 | linksToSkip: '^https://github.com/ ^https://opensource.org/ ^https://unix.stackexchange.com/'
19 | paths: '*.md doc/*.md helpers/*.md'
20 | timeout: 60000
21 |
22 | spellcheck:
23 | runs-on: ubuntu-latest
24 | steps:
25 | - uses: actions/checkout@v4
26 | - uses: tbroadley/spellchecker-cli-action@v1
27 | with:
28 | dictionaries: '.github/dictionary.txt'
29 | files: '*.md doc/*.md helpers/*.md'
30 |
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 | name: "CodeQL"
2 |
3 | on:
4 | pull_request:
5 | push:
6 | branches-ignore:
7 | - 'dependabot/**'
8 | workflow_dispatch:
9 |
10 | jobs:
11 | analyze:
12 | name: Analyze
13 | runs-on: ubuntu-latest
14 | permissions:
15 | security-events: write
16 |
17 | strategy:
18 | fail-fast: false
19 | matrix:
20 | language: ['javascript']
21 |
22 | steps:
23 | - name: Checkout repository
24 | uses: actions/checkout@v4
25 |
26 | - name: Initialize CodeQL
27 | uses: github/codeql-action/init@v3
28 | with:
29 | config-file: ./.github/codeql-config.yaml
30 | languages: ${{ matrix.language }}
31 |
32 | - name: Perform CodeQL Analysis
33 | uses: github/codeql-action/analyze@v3
34 |
--------------------------------------------------------------------------------
/.github/workflows/test-repos.yml:
--------------------------------------------------------------------------------
1 | name: TestRepos
2 |
3 | on:
4 | pull_request:
5 | push:
6 | branches-ignore:
7 | - 'dependabot/**'
8 | workflow_dispatch:
9 |
10 | jobs:
11 | build:
12 |
13 | runs-on: ${{ matrix.os }}
14 |
15 | strategy:
16 | matrix:
17 | os: [ ubuntu-latest ]
18 | node-version: [ latest ]
19 |
20 | steps:
21 | - uses: actions/checkout@v4
22 | - name: Use Node.js ${{ matrix.node-version }}
23 | uses: actions/setup-node@v4
24 | with:
25 | node-version: ${{ matrix.node-version }}
26 | - name: Install Dependencies
27 | run: npm install --no-package-lock
28 | - name: Clone Test Repos
29 | run: npm run clone-test-repos
30 | - name: Lint Test Repos
31 | run: npm run lint-test-repos
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | coverage
2 | demo/markdown-it.min.js
3 | demo/markdownlint-browser.js
4 | demo/markdownlint-browser.min.js
5 | node_modules
6 | !test/node_modules
7 | !test/rules/node_modules
8 | npm-debug.log
9 | test-repos
10 | .DS_Store
11 | .vscode
12 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .eslintignore
2 | .github
3 | .markdownlint.json
4 | .npmrc
5 | .vscode
6 | coverage
7 | demo/*
8 | doc-build
9 | eslint.config.mjs
10 | example
11 | npm-debug.log
12 | schema/*.mjs
13 | scripts
14 | test
15 | test-repos
16 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 | ignore-scripts=true
3 | package-lock=false
4 |
--------------------------------------------------------------------------------
/demo/browser-exports.mjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | export { applyFixes, getVersion } from "markdownlint";
4 | export { lint as lintSync } from "markdownlint/sync";
5 | export { compile, parse, postprocess, preprocess } from "micromark";
6 | export { directive, directiveHtml } from "micromark-extension-directive";
7 | export { gfmAutolinkLiteral, gfmAutolinkLiteralHtml } from "micromark-extension-gfm-autolink-literal";
8 | export { gfmFootnote, gfmFootnoteHtml } from "micromark-extension-gfm-footnote";
9 | export { gfmTable, gfmTableHtml } from "micromark-extension-gfm-table";
10 | export { math, mathHtml } from "micromark-extension-math";
11 |
--------------------------------------------------------------------------------
/demo/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DavidAnson/markdownlint/224987d727ebada36752074d2466a061c9e03ff0/demo/favicon.ico
--------------------------------------------------------------------------------
/demo/favicon.svg:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/doc-build/.markdownlint.jsonc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../.markdownlint.json",
3 |
4 | // Headings are added by the "build-docs" script (build-rules.mjs)
5 | "first-line-heading": false
6 | }
7 |
--------------------------------------------------------------------------------
/doc-build/footing.md:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/doc-build/heading.md:
--------------------------------------------------------------------------------
1 | # Rules
2 |
3 | This document contains a description of all rules, what they are checking for,
4 | as well as examples of documents that break the rule and corrected
5 | versions of the examples.
6 |
--------------------------------------------------------------------------------
/doc-build/md001.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when you skip heading levels in a Markdown document, for
2 | example:
3 |
4 | ```markdown
5 | # Heading 1
6 |
7 | ### Heading 3
8 |
9 | We skipped out a 2nd level heading in this document
10 | ```
11 |
12 | When using multiple heading levels, nested headings should increase by only one
13 | level at a time:
14 |
15 | ```markdown
16 | # Heading 1
17 |
18 | ## Heading 2
19 |
20 | ### Heading 3
21 |
22 | #### Heading 4
23 |
24 | ## Another Heading 2
25 |
26 | ### Another Heading 3
27 | ```
28 |
29 | Rationale: Headings represent the structure of a document and can be confusing
30 | when skipped - especially for accessibility scenarios. More information:
31 | .
32 |
--------------------------------------------------------------------------------
/doc-build/md011.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when text that appears to be a link is encountered, but
2 | where the syntax appears to have been reversed (the `[]` and `()` are
3 | reversed):
4 |
5 | ```markdown
6 | (Incorrect link syntax)[https://www.example.com/]
7 | ```
8 |
9 | To fix this, swap the `[]` and `()` around:
10 |
11 | ```markdown
12 | [Correct link syntax](https://www.example.com/)
13 | ```
14 |
15 | Note: [Markdown Extra](https://en.wikipedia.org/wiki/Markdown_Extra)-style
16 | footnotes do not trigger this rule:
17 |
18 | ```markdown
19 | For (example)[^1]
20 | ```
21 |
22 | Rationale: Reversed links are not rendered as usable links.
23 |
--------------------------------------------------------------------------------
/doc-build/md012.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when there are multiple consecutive blank lines in the
2 | document:
3 |
4 | ```markdown
5 | Some text here
6 |
7 |
8 | Some more text here
9 | ```
10 |
11 | To fix this, delete the offending lines:
12 |
13 | ```markdown
14 | Some text here
15 |
16 | Some more text here
17 | ```
18 |
19 | Note: this rule will not be triggered if there are multiple consecutive blank
20 | lines inside code blocks.
21 |
22 | Note: The `maximum` parameter can be used to configure the maximum number of
23 | consecutive blank lines.
24 |
25 | Rationale: Except in a code block, blank lines serve no purpose and do not
26 | affect the rendering of content.
27 |
--------------------------------------------------------------------------------
/doc-build/md018.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when spaces are missing after the hash characters
2 | in an atx style heading:
3 |
4 | ```markdown
5 | #Heading 1
6 |
7 | ##Heading 2
8 | ```
9 |
10 | To fix this, separate the heading text from the hash character by a single
11 | space:
12 |
13 | ```markdown
14 | # Heading 1
15 |
16 | ## Heading 2
17 | ```
18 |
19 | Rationale: Violations of this rule can lead to improperly rendered content.
20 |
--------------------------------------------------------------------------------
/doc-build/md019.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when more than one space is used to separate the
2 | heading text from the hash characters in an atx style heading:
3 |
4 | ```markdown
5 | # Heading 1
6 |
7 | ## Heading 2
8 | ```
9 |
10 | To fix this, separate the heading text from the hash character by a single
11 | space:
12 |
13 | ```markdown
14 | # Heading 1
15 |
16 | ## Heading 2
17 | ```
18 |
19 | Rationale: Extra space has no purpose and does not affect the rendering of
20 | content.
21 |
--------------------------------------------------------------------------------
/doc-build/md020.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when spaces are missing inside the hash characters
2 | in a closed atx style heading:
3 |
4 | ```markdown
5 | #Heading 1#
6 |
7 | ##Heading 2##
8 | ```
9 |
10 | To fix this, separate the heading text from the hash character by a single
11 | space:
12 |
13 | ```markdown
14 | # Heading 1 #
15 |
16 | ## Heading 2 ##
17 | ```
18 |
19 | Note: this rule will fire if either side of the heading is missing spaces.
20 |
21 | Rationale: Violations of this rule can lead to improperly rendered content.
22 |
--------------------------------------------------------------------------------
/doc-build/md021.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when more than one space is used to separate the
2 | heading text from the hash characters in a closed atx style heading:
3 |
4 | ```markdown
5 | # Heading 1 #
6 |
7 | ## Heading 2 ##
8 | ```
9 |
10 | To fix this, separate the heading text from the hash character by a single
11 | space:
12 |
13 | ```markdown
14 | # Heading 1 #
15 |
16 | ## Heading 2 ##
17 | ```
18 |
19 | Note: this rule will fire if either side of the heading contains multiple
20 | spaces.
21 |
22 | Rationale: Extra space has no purpose and does not affect the rendering of
23 | content.
24 |
--------------------------------------------------------------------------------
/doc-build/md023.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when a heading is indented by one or more spaces:
2 |
3 | ```markdown
4 | Some text
5 |
6 | # Indented heading
7 | ```
8 |
9 | To fix this, ensure that all headings start at the beginning of the line:
10 |
11 | ```markdown
12 | Some text
13 |
14 | # Heading
15 | ```
16 |
17 | Note that scenarios like block quotes "indent" the start of the line, so the
18 | following is also correct:
19 |
20 | ```markdown
21 | > # Heading in Block Quote
22 | ```
23 |
24 | Rationale: Headings that don't start at the beginning of the line will not be
25 | parsed as headings, and will instead appear as regular text.
26 |
--------------------------------------------------------------------------------
/doc-build/md024.md:
--------------------------------------------------------------------------------
1 | This rule is triggered if there are multiple headings in the document that have
2 | the same text:
3 |
4 | ```markdown
5 | # Some text
6 |
7 | ## Some text
8 | ```
9 |
10 | To fix this, ensure that the content of each heading is different:
11 |
12 | ```markdown
13 | # Some text
14 |
15 | ## Some more text
16 | ```
17 |
18 | If the parameter `siblings_only` is set to `true`, duplication is allowed for
19 | headings with different parents (as is common in changelogs):
20 |
21 | ```markdown
22 | # Change log
23 |
24 | ## 1.0.0
25 |
26 | ### Features
27 |
28 | ## 2.0.0
29 |
30 | ### Features
31 | ```
32 |
33 | Rationale: Some Markdown parsers generate anchors for headings based on the
34 | heading name; headings with the same content can cause problems with that.
35 |
--------------------------------------------------------------------------------
/doc-build/md027.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when blockquotes have more than one space after the
2 | blockquote (`>`) symbol:
3 |
4 | ```markdown
5 | > This is a blockquote with bad indentation
6 | > there should only be one.
7 | ```
8 |
9 | To fix, remove any extraneous space:
10 |
11 | ```markdown
12 | > This is a blockquote with correct
13 | > indentation.
14 | ```
15 |
16 | Inferring intended list indentation within a blockquote can be challenging;
17 | setting the `list_items` parameter to `false` disables this rule for ordered
18 | and unordered list items.
19 |
20 | Rationale: Consistent formatting makes it easier to understand a document.
21 |
--------------------------------------------------------------------------------
/doc-build/md028.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when two blockquote blocks are separated by nothing
2 | except for a blank line:
3 |
4 | ```markdown
5 | > This is a blockquote
6 | > which is immediately followed by
7 |
8 | > this blockquote. Unfortunately
9 | > In some parsers, these are treated as the same blockquote.
10 | ```
11 |
12 | To fix this, ensure that any blockquotes that are right next to each other
13 | have some text in between:
14 |
15 | ```markdown
16 | > This is a blockquote.
17 |
18 | And Jimmy also said:
19 |
20 | > This too is a blockquote.
21 | ```
22 |
23 | Alternatively, if they are supposed to be the same quote, then add the
24 | blockquote symbol at the beginning of the blank line:
25 |
26 | ```markdown
27 | > This is a blockquote.
28 | >
29 | > This is the same blockquote.
30 | ```
31 |
32 | Rationale: Some Markdown parsers will treat two blockquotes separated by one
33 | or more blank lines as the same blockquote, while others will treat them as
34 | separate blockquotes.
35 |
--------------------------------------------------------------------------------
/doc-build/md033.md:
--------------------------------------------------------------------------------
1 | This rule is triggered whenever raw HTML is used in a Markdown document:
2 |
3 | ```markdown
4 |
Inline HTML heading
5 | ```
6 |
7 | To fix this, use 'pure' Markdown instead of including raw HTML:
8 |
9 | ```markdown
10 | # Markdown heading
11 | ```
12 |
13 | Note: To allow specific HTML elements, use the `allowed_elements` parameter.
14 |
15 | Rationale: Raw HTML is allowed in Markdown, but this rule is included for
16 | those who want their documents to only include "pure" Markdown, or for those
17 | who are rendering Markdown documents into something other than HTML.
18 |
--------------------------------------------------------------------------------
/doc-build/md035.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when inconsistent styles of horizontal rules are used
2 | in the document:
3 |
4 | ```markdown
5 | ---
6 |
7 | - - -
8 |
9 | ***
10 |
11 | * * *
12 |
13 | ****
14 | ```
15 |
16 | To fix this, use the same horizontal rule everywhere:
17 |
18 | ```markdown
19 | ---
20 |
21 | ---
22 | ```
23 |
24 | The configured style can ensure all horizontal rules use a specific string or it
25 | can ensure all horizontal rules match the first horizontal rule (`consistent`).
26 |
27 | Rationale: Consistent formatting makes it easier to understand a document.
28 |
--------------------------------------------------------------------------------
/doc-build/md037.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when emphasis markers (bold, italic) are used, but they
2 | have spaces between the markers and the text:
3 |
4 | ```markdown
5 | Here is some ** bold ** text.
6 |
7 | Here is some * italic * text.
8 |
9 | Here is some more __ bold __ text.
10 |
11 | Here is some more _ italic _ text.
12 | ```
13 |
14 | To fix this, remove the spaces around the emphasis markers:
15 |
16 | ```markdown
17 | Here is some **bold** text.
18 |
19 | Here is some *italic* text.
20 |
21 | Here is some more __bold__ text.
22 |
23 | Here is some more _italic_ text.
24 | ```
25 |
26 | Rationale: Emphasis is only parsed as such when the asterisks/underscores
27 | aren't surrounded by spaces. This rule attempts to detect where
28 | they were surrounded by spaces, but it appears that emphasized text was
29 | intended by the author.
30 |
--------------------------------------------------------------------------------
/doc-build/md039.md:
--------------------------------------------------------------------------------
1 | This rule is triggered on links that have spaces surrounding the link text:
2 |
3 | ```markdown
4 | [ a link ](https://www.example.com/)
5 | ```
6 |
7 | To fix this, remove the spaces surrounding the link text:
8 |
9 | ```markdown
10 | [a link](https://www.example.com/)
11 | ```
12 |
13 | Rationale: Consistent formatting makes it easier to understand a document.
14 |
--------------------------------------------------------------------------------
/doc-build/md042.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when an empty link is encountered:
2 |
3 | ```markdown
4 | [an empty link]()
5 | ```
6 |
7 | To fix the violation, provide a destination for the link:
8 |
9 | ```markdown
10 | [a valid link](https://example.com/)
11 | ```
12 |
13 | Empty fragments will trigger this rule:
14 |
15 | ```markdown
16 | [an empty fragment](#)
17 | ```
18 |
19 | But non-empty fragments will not:
20 |
21 | ```markdown
22 | [a valid fragment](#fragment)
23 | ```
24 |
25 | Rationale: Empty links do not lead anywhere and therefore don't function as
26 | links.
27 |
--------------------------------------------------------------------------------
/doc-build/md046.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when unwanted or different code block styles are used in
2 | the same document.
3 |
4 | In the default configuration this rule reports a violation for the following
5 | document:
6 |
7 |
8 |
9 | Some text.
10 |
11 | # Indented code
12 |
13 | More text.
14 |
15 | ```ruby
16 | # Fenced code
17 | ```
18 |
19 | More text.
20 |
21 |
22 |
23 | To fix violations of this rule, use a consistent style (either indenting or code
24 | fences).
25 |
26 | The configured code block style can be specific (`fenced`, `indented`) or can
27 | require all code blocks match the first code block (`consistent`).
28 |
29 | Rationale: Consistent formatting makes it easier to understand a document.
30 |
--------------------------------------------------------------------------------
/doc-build/md047.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when there is not a single newline character at the end
2 | of a file.
3 |
4 | An example that triggers the rule:
5 |
6 | ```markdown
7 | # Heading
8 |
9 | This file ends without a newline.[EOF]
10 | ```
11 |
12 | To fix the violation, add a newline character to the end of the file:
13 |
14 | ```markdown
15 | # Heading
16 |
17 | This file ends with a newline.
18 | [EOF]
19 | ```
20 |
21 | Rationale: Some programs have trouble with files that do not end with a newline.
22 |
23 | More information: [What's the point in adding a new line to the end of a
24 | file?][stack-exchange]
25 |
26 | [stack-exchange]: https://unix.stackexchange.com/questions/18743/whats-the-point-in-adding-a-new-line-to-the-end-of-a-file
27 |
--------------------------------------------------------------------------------
/doc-build/md048.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when the symbols used in the document for fenced code
2 | blocks do not match the configured code fence style:
3 |
4 | ````markdown
5 | ```ruby
6 | # Fenced code
7 | ```
8 |
9 | ~~~ruby
10 | # Fenced code
11 | ~~~
12 | ````
13 |
14 | To fix this issue, use the configured code fence style throughout the
15 | document:
16 |
17 | ````markdown
18 | ```ruby
19 | # Fenced code
20 | ```
21 |
22 | ```ruby
23 | # Fenced code
24 | ```
25 | ````
26 |
27 | The configured code fence style can be a specific symbol to use (`backtick`,
28 | `tilde`) or it can require all code fences match the first code fence
29 | (`consistent`).
30 |
31 | Rationale: Consistent formatting makes it easier to understand a document.
32 |
--------------------------------------------------------------------------------
/doc-build/md049.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when the symbols used in the document for emphasis do not
2 | match the configured emphasis style:
3 |
4 | ```markdown
5 | *Text*
6 | _Text_
7 | ```
8 |
9 | To fix this issue, use the configured emphasis style throughout the document:
10 |
11 | ```markdown
12 | *Text*
13 | *Text*
14 | ```
15 |
16 | The configured emphasis style can be a specific symbol to use (`asterisk`,
17 | `underscore`) or can require all emphasis matches the first emphasis
18 | (`consistent`).
19 |
20 | Note: Emphasis within a word is restricted to `asterisk` in order to avoid
21 | unwanted emphasis for words containing internal underscores like_this_one.
22 |
23 | Rationale: Consistent formatting makes it easier to understand a document.
24 |
--------------------------------------------------------------------------------
/doc-build/md050.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when the symbols used in the document for strong do not
2 | match the configured strong style:
3 |
4 | ```markdown
5 | **Text**
6 | __Text__
7 | ```
8 |
9 | To fix this issue, use the configured strong style throughout the document:
10 |
11 | ```markdown
12 | **Text**
13 | **Text**
14 | ```
15 |
16 | The configured strong style can be a specific symbol to use (`asterisk`,
17 | `underscore`) or can require all strong matches the first strong (`consistent`).
18 |
19 | Note: Emphasis within a word is restricted to `asterisk` in order to avoid
20 | unwanted emphasis for words containing internal underscores like__this__one.
21 |
22 | Rationale: Consistent formatting makes it easier to understand a document.
23 |
--------------------------------------------------------------------------------
/doc-build/md059.md:
--------------------------------------------------------------------------------
1 | This rule is triggered when a link has generic text like `[click here](...)` or
2 | `[link](...)`.
3 |
4 | Link text should be descriptive and communicate the purpose of the link (e.g.,
5 | `[Download the budget document](...)` or `[CommonMark Specification](...)`).
6 | This is especially important for screen readers which sometimes present links
7 | without context.
8 |
9 | By default, this rule prohibits a small number of common English words/phrases.
10 | To customize that list of words/phrases, set the `prohibited_texts` parameter to
11 | an `Array` of `string`s.
12 |
13 | Note: For languages other than English, use the `prohibited_texts` parameter to
14 | customize the list for that language. It is *not* a goal for this rule to have
15 | translations for every language.
16 |
17 | Note: This rule checks Markdown links; HTML links are ignored.
18 |
19 | More information:
20 |
--------------------------------------------------------------------------------
/doc/Prettier.md:
--------------------------------------------------------------------------------
1 | # Using `markdownlint` with Prettier
2 |
3 | [`Prettier`](https://prettier.io) is a popular code formatter.
4 | For the most part, Prettier works seamlessly with `markdownlint`.
5 |
6 | You can `extend` the [`prettier.json`](../style/prettier.json) style to disable
7 | all `markdownlint` rules that overlap with Prettier.
8 |
9 | Other scenarios are documented below.
10 |
11 | ## List item indentation
12 |
13 | The default settings of `markdownlint` and `Prettier` are compatible and don't
14 | result in any linting violations. If `Prettier` is used with `--tab-width` set
15 | to `4` (vs. `2`), the following `markdownlint` configuration can be used:
16 |
17 | ```json
18 | {
19 | "list-marker-space": {
20 | "ul_multi": 3,
21 | "ul_single": 3
22 | },
23 | "ul-indent": {
24 | "indent": 4
25 | }
26 | }
27 | ```
28 |
--------------------------------------------------------------------------------
/doc/md001.md:
--------------------------------------------------------------------------------
1 | # `MD001` - Heading levels should only increment by one level at a time
2 |
3 | Tags: `headings`
4 |
5 | Aliases: `heading-increment`
6 |
7 | This rule is triggered when you skip heading levels in a Markdown document, for
8 | example:
9 |
10 | ```markdown
11 | # Heading 1
12 |
13 | ### Heading 3
14 |
15 | We skipped out a 2nd level heading in this document
16 | ```
17 |
18 | When using multiple heading levels, nested headings should increase by only one
19 | level at a time:
20 |
21 | ```markdown
22 | # Heading 1
23 |
24 | ## Heading 2
25 |
26 | ### Heading 3
27 |
28 | #### Heading 4
29 |
30 | ## Another Heading 2
31 |
32 | ### Another Heading 3
33 | ```
34 |
35 | Rationale: Headings represent the structure of a document and can be confusing
36 | when skipped - especially for accessibility scenarios. More information:
37 | .
38 |
--------------------------------------------------------------------------------
/doc/md011.md:
--------------------------------------------------------------------------------
1 | # `MD011` - Reversed link syntax
2 |
3 | Tags: `links`
4 |
5 | Aliases: `no-reversed-links`
6 |
7 | Fixable: Some violations can be fixed by tooling
8 |
9 | This rule is triggered when text that appears to be a link is encountered, but
10 | where the syntax appears to have been reversed (the `[]` and `()` are
11 | reversed):
12 |
13 | ```markdown
14 | (Incorrect link syntax)[https://www.example.com/]
15 | ```
16 |
17 | To fix this, swap the `[]` and `()` around:
18 |
19 | ```markdown
20 | [Correct link syntax](https://www.example.com/)
21 | ```
22 |
23 | Note: [Markdown Extra](https://en.wikipedia.org/wiki/Markdown_Extra)-style
24 | footnotes do not trigger this rule:
25 |
26 | ```markdown
27 | For (example)[^1]
28 | ```
29 |
30 | Rationale: Reversed links are not rendered as usable links.
31 |
--------------------------------------------------------------------------------
/doc/md012.md:
--------------------------------------------------------------------------------
1 | # `MD012` - Multiple consecutive blank lines
2 |
3 | Tags: `blank_lines`, `whitespace`
4 |
5 | Aliases: `no-multiple-blanks`
6 |
7 | Parameters:
8 |
9 | - `maximum`: Consecutive blank lines (`integer`, default `1`)
10 |
11 | Fixable: Some violations can be fixed by tooling
12 |
13 | This rule is triggered when there are multiple consecutive blank lines in the
14 | document:
15 |
16 | ```markdown
17 | Some text here
18 |
19 |
20 | Some more text here
21 | ```
22 |
23 | To fix this, delete the offending lines:
24 |
25 | ```markdown
26 | Some text here
27 |
28 | Some more text here
29 | ```
30 |
31 | Note: this rule will not be triggered if there are multiple consecutive blank
32 | lines inside code blocks.
33 |
34 | Note: The `maximum` parameter can be used to configure the maximum number of
35 | consecutive blank lines.
36 |
37 | Rationale: Except in a code block, blank lines serve no purpose and do not
38 | affect the rendering of content.
39 |
--------------------------------------------------------------------------------
/doc/md018.md:
--------------------------------------------------------------------------------
1 | # `MD018` - No space after hash on atx style heading
2 |
3 | Tags: `atx`, `headings`, `spaces`
4 |
5 | Aliases: `no-missing-space-atx`
6 |
7 | Fixable: Some violations can be fixed by tooling
8 |
9 | This rule is triggered when spaces are missing after the hash characters
10 | in an atx style heading:
11 |
12 | ```markdown
13 | #Heading 1
14 |
15 | ##Heading 2
16 | ```
17 |
18 | To fix this, separate the heading text from the hash character by a single
19 | space:
20 |
21 | ```markdown
22 | # Heading 1
23 |
24 | ## Heading 2
25 | ```
26 |
27 | Rationale: Violations of this rule can lead to improperly rendered content.
28 |
--------------------------------------------------------------------------------
/doc/md019.md:
--------------------------------------------------------------------------------
1 | # `MD019` - Multiple spaces after hash on atx style heading
2 |
3 | Tags: `atx`, `headings`, `spaces`
4 |
5 | Aliases: `no-multiple-space-atx`
6 |
7 | Fixable: Some violations can be fixed by tooling
8 |
9 | This rule is triggered when more than one space is used to separate the
10 | heading text from the hash characters in an atx style heading:
11 |
12 | ```markdown
13 | # Heading 1
14 |
15 | ## Heading 2
16 | ```
17 |
18 | To fix this, separate the heading text from the hash character by a single
19 | space:
20 |
21 | ```markdown
22 | # Heading 1
23 |
24 | ## Heading 2
25 | ```
26 |
27 | Rationale: Extra space has no purpose and does not affect the rendering of
28 | content.
29 |
--------------------------------------------------------------------------------
/doc/md020.md:
--------------------------------------------------------------------------------
1 | # `MD020` - No space inside hashes on closed atx style heading
2 |
3 | Tags: `atx_closed`, `headings`, `spaces`
4 |
5 | Aliases: `no-missing-space-closed-atx`
6 |
7 | Fixable: Some violations can be fixed by tooling
8 |
9 | This rule is triggered when spaces are missing inside the hash characters
10 | in a closed atx style heading:
11 |
12 | ```markdown
13 | #Heading 1#
14 |
15 | ##Heading 2##
16 | ```
17 |
18 | To fix this, separate the heading text from the hash character by a single
19 | space:
20 |
21 | ```markdown
22 | # Heading 1 #
23 |
24 | ## Heading 2 ##
25 | ```
26 |
27 | Note: this rule will fire if either side of the heading is missing spaces.
28 |
29 | Rationale: Violations of this rule can lead to improperly rendered content.
30 |
--------------------------------------------------------------------------------
/doc/md021.md:
--------------------------------------------------------------------------------
1 | # `MD021` - Multiple spaces inside hashes on closed atx style heading
2 |
3 | Tags: `atx_closed`, `headings`, `spaces`
4 |
5 | Aliases: `no-multiple-space-closed-atx`
6 |
7 | Fixable: Some violations can be fixed by tooling
8 |
9 | This rule is triggered when more than one space is used to separate the
10 | heading text from the hash characters in a closed atx style heading:
11 |
12 | ```markdown
13 | # Heading 1 #
14 |
15 | ## Heading 2 ##
16 | ```
17 |
18 | To fix this, separate the heading text from the hash character by a single
19 | space:
20 |
21 | ```markdown
22 | # Heading 1 #
23 |
24 | ## Heading 2 ##
25 | ```
26 |
27 | Note: this rule will fire if either side of the heading contains multiple
28 | spaces.
29 |
30 | Rationale: Extra space has no purpose and does not affect the rendering of
31 | content.
32 |
--------------------------------------------------------------------------------
/doc/md023.md:
--------------------------------------------------------------------------------
1 | # `MD023` - Headings must start at the beginning of the line
2 |
3 | Tags: `headings`, `spaces`
4 |
5 | Aliases: `heading-start-left`
6 |
7 | Fixable: Some violations can be fixed by tooling
8 |
9 | This rule is triggered when a heading is indented by one or more spaces:
10 |
11 | ```markdown
12 | Some text
13 |
14 | # Indented heading
15 | ```
16 |
17 | To fix this, ensure that all headings start at the beginning of the line:
18 |
19 | ```markdown
20 | Some text
21 |
22 | # Heading
23 | ```
24 |
25 | Note that scenarios like block quotes "indent" the start of the line, so the
26 | following is also correct:
27 |
28 | ```markdown
29 | > # Heading in Block Quote
30 | ```
31 |
32 | Rationale: Headings that don't start at the beginning of the line will not be
33 | parsed as headings, and will instead appear as regular text.
34 |
--------------------------------------------------------------------------------
/doc/md027.md:
--------------------------------------------------------------------------------
1 | # `MD027` - Multiple spaces after blockquote symbol
2 |
3 | Tags: `blockquote`, `indentation`, `whitespace`
4 |
5 | Aliases: `no-multiple-space-blockquote`
6 |
7 | Parameters:
8 |
9 | - `list_items`: Include list items (`boolean`, default `true`)
10 |
11 | Fixable: Some violations can be fixed by tooling
12 |
13 | This rule is triggered when blockquotes have more than one space after the
14 | blockquote (`>`) symbol:
15 |
16 | ```markdown
17 | > This is a blockquote with bad indentation
18 | > there should only be one.
19 | ```
20 |
21 | To fix, remove any extraneous space:
22 |
23 | ```markdown
24 | > This is a blockquote with correct
25 | > indentation.
26 | ```
27 |
28 | Inferring intended list indentation within a blockquote can be challenging;
29 | setting the `list_items` parameter to `false` disables this rule for ordered
30 | and unordered list items.
31 |
32 | Rationale: Consistent formatting makes it easier to understand a document.
33 |
--------------------------------------------------------------------------------
/doc/md033.md:
--------------------------------------------------------------------------------
1 | # `MD033` - Inline HTML
2 |
3 | Tags: `html`
4 |
5 | Aliases: `no-inline-html`
6 |
7 | Parameters:
8 |
9 | - `allowed_elements`: Allowed elements (`string[]`, default `[]`)
10 |
11 | This rule is triggered whenever raw HTML is used in a Markdown document:
12 |
13 | ```markdown
14 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/test/headings_good.md:
--------------------------------------------------------------------------------
1 | # Heading 1
2 |
3 | ## Heading 2
4 |
5 | ## Heading 3
6 |
--------------------------------------------------------------------------------
/test/headings_good_setext_with_atx.md:
--------------------------------------------------------------------------------
1 | Heading 1
2 | =========
3 |
4 | Heading 2
5 | ---------
6 |
7 | ## Heading 2 {MD003}
8 |
9 | ### Heading 3
10 |
11 | #### Heading 4 {MD003} ####
12 |
13 |
18 |
--------------------------------------------------------------------------------
/test/headings_good_setext_with_atx_closed.md:
--------------------------------------------------------------------------------
1 | Heading 1
2 | =========
3 |
4 | Heading 2
5 | ---------
6 |
7 | ## Heading 2 {MD003} ##
8 |
9 | ### Heading 3 ###
10 |
11 | #### Heading 4 {MD003}
12 |
13 |
18 |
--------------------------------------------------------------------------------
/test/headings_good_with_issue_numbers.md:
--------------------------------------------------------------------------------
1 | # Heading 1
2 |
3 | ## Heading 2
4 |
5 | See the following issues:
6 |
7 | * #1234
8 | * #5678 (and related)
9 | * #5678
10 | * #9101
11 |
12 | ## Heading 3
13 |
--------------------------------------------------------------------------------
/test/headings_surrounding_space_atx.md:
--------------------------------------------------------------------------------
1 | # Heading 1
2 |
3 | ## Heading 2 {MD022}
4 | Some text
5 | ## Heading 3 {MD022}
6 | Some text
7 | ## Heading 4 {MD022}
8 |
9 | ## Heading 5
10 |
11 | * This shouldn't trigger MD022, but did because of some bug where we tried to
12 | #catch headings that kramdown didn't parse correctly.
13 |
--------------------------------------------------------------------------------
/test/headings_surrounding_space_setext.md:
--------------------------------------------------------------------------------
1 | Heading 1
2 | =========
3 |
4 | Heading 2 {MD022}
5 | -----------------
6 | Some text {MD022} {MD025}
7 | Heading 3
8 | =================
9 | Some text {MD022} {MD025}
10 | Heading 4
11 | =================
12 | Some text
13 |
14 | Heading 5
15 | ---------
16 |
--------------------------------------------------------------------------------
/test/headings_with_spaces_at_the_beginning.md:
--------------------------------------------------------------------------------
1 | Some text
2 |
3 | # Heading 1 {MD023}
4 |
5 | Setext style fully indented {MD023}
6 | ===================================
7 |
8 | Setext style title only indented {MD023}
9 | =========================================
10 |
11 | * Test situations in which MD023 shouldn't be triggered.
12 |
13 | ```rb
14 | # This shouldn't trigger MD023 as it is a code comment.
15 | foo = "And here is some code"
16 | ```
17 |
18 | * This is another case where MD023 shouldn't be triggered
19 | # Test {MD022} Valid heading for CommonMark (see section 5.2)
20 | # Test {MD022} {MD023} Also valid heading for CommonMark
21 |
22 |
26 |
--------------------------------------------------------------------------------
/test/hr-in-blockquote-dash.md:
--------------------------------------------------------------------------------
1 | # HR in Blockquote, Dash
2 |
3 | ---
4 |
5 | ***
6 |
7 | ___
8 |
9 | {MD035:5} {MD035:7}
10 |
11 | > Text
12 | >
13 | > ---
14 | >
15 | > ***
16 | >
17 | > ___
18 | >
19 | > Text
20 |
21 | {MD035:15} {MD035:17}
22 |
23 | - - -
24 |
25 | > Text
26 | >
27 | > > Text
28 | > >
29 | > > ---
30 | > >
31 | > > ***
32 | > >
33 | > > ___
34 | > >
35 | > > Text
36 | >
37 | > Text
38 |
39 | {MD035:23} {MD035:31} {MD035:33}
40 |
--------------------------------------------------------------------------------
/test/hr-in-blockquote-star.md:
--------------------------------------------------------------------------------
1 | # HR in Blockquote, Star
2 |
3 | ***
4 |
5 | ___
6 |
7 | ---
8 |
9 | {MD035:5} {MD035:7}
10 |
11 | > Text
12 | >
13 | > ---
14 | >
15 | > ***
16 | >
17 | > ___
18 | >
19 | > Text
20 |
21 | {MD035:13} {MD035:17}
22 |
23 | * * *
24 |
25 | > Text
26 | >
27 | > > Text
28 | > >
29 | > > ---
30 | > >
31 | > > ***
32 | > >
33 | > > ___
34 | > >
35 | > > Text
36 | >
37 | > Text
38 |
39 | {MD035:23} {MD035:29} {MD035:33}
40 |
--------------------------------------------------------------------------------
/test/hr-in-blockquote-under.md:
--------------------------------------------------------------------------------
1 | # HR in Blockquote, Under
2 |
3 | ___
4 |
5 | ---
6 |
7 | ***
8 |
9 | {MD035:5} {MD035:7}
10 |
11 | > Text
12 | >
13 | > ---
14 | >
15 | > ***
16 | >
17 | > ___
18 | >
19 | > Text
20 |
21 | {MD035:13} {MD035:15}
22 |
23 | _ _ _
24 |
25 | > Text
26 | >
27 | > > Text
28 | > >
29 | > > ---
30 | > >
31 | > > ***
32 | > >
33 | > > ___
34 | > >
35 | > > Text
36 | >
37 | > Text
38 |
39 | {MD035:23} {MD035:29} {MD035:31}
40 |
--------------------------------------------------------------------------------
/test/hr-in-list-dash.md:
--------------------------------------------------------------------------------
1 | # HR in List, Dash
2 |
3 | ---
4 |
5 | ***
6 |
7 | ___
8 |
9 | {MD035:5} {MD035:7}
10 |
11 |
12 |
13 | - list
14 | - ---
15 | - list
16 | - ***
17 | - list
18 | - ___
19 | - list
20 |
21 | {MD035:14} {MD035:16} {MD035:18}
22 |
23 | * list
24 | * ---
25 | * list
26 | * ***
27 | * list
28 | * ___
29 | * list
30 |
31 | {MD035:26} {MD035:28}
32 |
--------------------------------------------------------------------------------
/test/hr-in-list-star.md:
--------------------------------------------------------------------------------
1 | # HR in List, Star
2 |
3 | ***
4 |
5 | ___
6 |
7 | ---
8 |
9 | {MD035:5} {MD035:7}
10 |
11 |
12 |
13 | - list
14 | - ---
15 | - list
16 | - ***
17 | - list
18 | - ___
19 | - list
20 |
21 | {MD035:14} {MD035:18}
22 |
23 | * list
24 | * ---
25 | * list
26 | * ***
27 | * list
28 | * ___
29 | * list
30 |
31 | {MD035:24} {MD035:26} {MD035:28}
32 |
--------------------------------------------------------------------------------
/test/hr-in-list-under.md:
--------------------------------------------------------------------------------
1 | # HR in List, Under
2 |
3 | ___
4 |
5 | ---
6 |
7 | ***
8 |
9 | {MD035:5} {MD035:7}
10 |
11 |
12 |
13 | - list
14 | - ---
15 | - list
16 | - ***
17 | - list
18 | - ___
19 | - list
20 |
21 | {MD035:14} {MD035:16}
22 |
23 | * list
24 | * ---
25 | * list
26 | * ***
27 | * list
28 | * ___
29 | * list
30 |
31 | {MD035:24} {MD035:26}
32 |
--------------------------------------------------------------------------------
/test/hr-style-custom.md:
--------------------------------------------------------------------------------
1 | # HR Style Custom
2 |
3 | Text
4 |
5 | ---
6 | {MD035:5}
7 |
8 | Text
9 |
10 | - - -
11 | {MD035:10}
12 |
13 | Text
14 |
15 | - - -
16 |
17 | Text
18 |
19 | ***
20 | {MD035:19}
21 |
22 | Text
23 |
24 |
29 |
--------------------------------------------------------------------------------
/test/hr_style_dashes.md:
--------------------------------------------------------------------------------
1 | # hr_style_dashes
2 |
3 | ***
4 |
5 | * * *
6 |
7 | *****
8 |
9 | ---
10 |
11 | - - -
12 |
13 | -----
14 |
15 | ___
16 |
17 | _ _ _
18 |
19 | _____
20 |
21 | ***
22 |
23 | {MD035:3} {MD035:5} {MD035:7} {MD035:11} {MD035:13}
24 | {MD035:15} {MD035:17} {MD035:19} {MD035:21}
25 |
26 |
31 |
--------------------------------------------------------------------------------
/test/hr_style_inconsistent.md:
--------------------------------------------------------------------------------
1 | # hr_style_inconsistent
2 |
3 | ***
4 |
5 | * * *
6 |
7 | *****
8 |
9 | ---
10 |
11 | - - -
12 |
13 | -----
14 |
15 | ___
16 |
17 | _ _ _
18 |
19 | _____
20 |
21 | ***
22 |
23 | {MD035:5} {MD035:7} {MD035:9} {MD035:11} {MD035:13} {MD035:15} {MD035:17} {MD035:19}
24 |
--------------------------------------------------------------------------------
/test/hr_style_long.md:
--------------------------------------------------------------------------------
1 | # hr_style_long
2 |
3 | ***
4 |
5 | * * *
6 |
7 | *****
8 |
9 | ---
10 |
11 | - - -
12 |
13 | -----
14 |
15 | ___
16 |
17 | _ _ _
18 |
19 | _____
20 |
21 | ***
22 |
23 | {MD035:3} {MD035:5} {MD035:7} {MD035:9} {MD035:11} {MD035:13} {MD035:15}
24 | {MD035:17} {MD035:21}
25 |
26 |
31 |
--------------------------------------------------------------------------------
/test/hr_style_stars.md:
--------------------------------------------------------------------------------
1 | # hr_style_stars
2 |
3 | ***
4 |
5 | * * *
6 |
7 | *****
8 |
9 | ---
10 |
11 | - - -
12 |
13 | -----
14 |
15 | ___
16 |
17 | _ _ _
18 |
19 | _____
20 |
21 | ***
22 |
23 | {MD035:5} {MD035:7} {MD035:9} {MD035:11} {MD035:13} {MD035:15} {MD035:17} {MD035:19}
24 |
25 |
30 |
--------------------------------------------------------------------------------
/test/html-comment-in-code-and-table.md:
--------------------------------------------------------------------------------
1 | # HTML Comment in Code and Table
2 |
3 | `{MD038} `
4 |
5 |
6 |
7 | ```text
8 |
9 | ```
10 |
11 |
12 |
13 | | Table |
14 | |------------|
15 | | `{MD038} ` |
16 |
17 | * item
18 |
19 | `{MD038} `
20 |
21 | * item
22 |
23 |
24 |
25 | * item
26 |
27 | ```text
28 |
29 | ```
30 |
31 | * item
32 |
33 |
34 |
35 | * item
36 |
37 | | Table |
38 | |------------|
39 | | `{MD038} ` |
40 |
41 |
44 |
--------------------------------------------------------------------------------
/test/html-comment-in-list-item.md:
--------------------------------------------------------------------------------
1 | # HTML Comment in List Item
2 |
3 | - item
4 |
5 |
7 |
8 | - item
9 |
10 | x
12 |
13 | - item
14 |
15 | x
17 |
18 | - item
19 |
20 | xx
23 |
24 | - item
25 |
26 | ```html
27 |
29 | ```
30 |
31 | - item
32 |
33 | ```html
34 | x
36 | ```
37 |
38 | - item
39 |
40 | ```html
41 | x
43 | ```
44 |
45 | - item
46 |
47 | ```html
48 | xx
51 | ```
52 |
53 | - item
54 |
--------------------------------------------------------------------------------
/test/hugo-quickstart-example-blank.md:
--------------------------------------------------------------------------------
1 | +++
2 | date = "2016-02-14T16:11:58+05:30"
3 | draft = true
4 | title = "Good to Great Book Review"
5 |
6 | +++
7 |
8 | # Heading 1
9 |
10 |
15 |
--------------------------------------------------------------------------------
/test/hugo-quickstart-example-clean.md:
--------------------------------------------------------------------------------
1 | +++
2 | date = "2016-02-14T16:11:58+05:30"
3 | draft = true
4 | title = "Good to Great Book Review"
5 |
6 | +++
7 | # Heading 1
8 |
9 |
14 |
--------------------------------------------------------------------------------
/test/hugo-quickstart-example-json.md:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Another Hugo Post",
3 | "description": "Nothing special, but one post is boring.",
4 | "date": "2014-09-02",
5 | "categories": [ "example", "configuration" ],
6 | "tags": [
7 | "example",
8 | "hugo",
9 | "toml"
10 | ],
11 | }
12 |
13 | # Heading {MD025}
14 |
--------------------------------------------------------------------------------
/test/ignore-comments.md:
--------------------------------------------------------------------------------
1 | # ignore-comments.md
2 |
3 | Hard tab {MD010}
4 |
5 | Hard tabs hard tabs {MD010}
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
20 |
21 | Text comment
24 | Hard tab {MD010}
25 | --> text
26 |
27 | Text
28 |
29 | Text {MD009}
30 |
31 | Text
32 |
33 | Text
36 |
37 | Text {MD009}
40 |
41 | Text
43 |
44 |
45 |
46 | Hard tab
47 |
--------------------------------------------------------------------------------
/test/ignore-html-block.md:
--------------------------------------------------------------------------------
1 | # ignore-html-block.md
2 |
3 |
14 |
--------------------------------------------------------------------------------
/test/inconsistent_bullet_indent_same_level.md:
--------------------------------------------------------------------------------
1 | # Inconsistent Bullet Indent Same Level
2 |
3 | * Item
4 | * Item {MD007}
5 | * Item {MD005}
6 | * Item
7 |
--------------------------------------------------------------------------------
/test/inconsistent_bullet_styles_asterisk.md:
--------------------------------------------------------------------------------
1 | # inconsistent_bullet_styles_asterisk
2 |
3 | * Item
4 | + Item {MD004}
5 | - Item {MD004}
6 | * Item
7 |
8 | > * Item
9 | > + Item {MD004}
10 | > - Item {MD004}
11 | > * Item
12 |
--------------------------------------------------------------------------------
/test/inconsistent_bullet_styles_dash.md:
--------------------------------------------------------------------------------
1 | # inconsistent_bullet_styles_dash
2 |
3 | - Item
4 | * Item {MD004}
5 | + Item {MD004}
6 | - Item
7 |
8 | > - Item
9 | > * Item {MD004}
10 | > + Item {MD004}
11 | > - Item
12 |
--------------------------------------------------------------------------------
/test/inconsistent_bullet_styles_plus.md:
--------------------------------------------------------------------------------
1 | # inconsistent_bullet_styles_plus
2 |
3 | + Item
4 | * Item {MD004}
5 | - Item {MD004}
6 | + Item
7 |
8 | > + Item
9 | > * Item {MD004}
10 | > - Item {MD004}
11 | > + Item
12 |
--------------------------------------------------------------------------------
/test/incorrect_bullet_style_asterisk.md:
--------------------------------------------------------------------------------
1 | # incorrect_bullet_style_asterisk
2 |
3 | * Item
4 | - Item {MD004}
5 | + Item {MD004}
6 |
7 |
12 |
--------------------------------------------------------------------------------
/test/incorrect_bullet_style_dash.md:
--------------------------------------------------------------------------------
1 | # incorrect_bullet_style_dash
2 |
3 | * Item {MD004}
4 | - Item
5 | + Item {MD004}
6 |
7 |
12 |
--------------------------------------------------------------------------------
/test/incorrect_bullet_style_plus.md:
--------------------------------------------------------------------------------
1 | # incorrect_bullet_style_plus
2 |
3 | * Item {MD004}
4 | - Item {MD004}
5 | + Item
6 |
7 |
12 |
--------------------------------------------------------------------------------
/test/incorrect_heading_atx.md:
--------------------------------------------------------------------------------
1 | # Heading 1 {MD003} #
2 |
3 | ## Heading 2
4 |
5 | Heading 3 {MD003}
6 | -----------------
7 |
8 |
13 |
--------------------------------------------------------------------------------
/test/incorrect_heading_atx_closed.md:
--------------------------------------------------------------------------------
1 | # Heading 1 #
2 |
3 | ## Heading 2 {MD003}
4 |
5 | Heading 3 {MD003}
6 | -----------------
7 |
8 |
13 |
--------------------------------------------------------------------------------
/test/incorrect_heading_setext.md:
--------------------------------------------------------------------------------
1 | # Heading 1 {MD003} #
2 |
3 | ## Heading 2 {MD003}
4 |
5 | Heading 3
6 | ---------
7 |
8 |
13 |
--------------------------------------------------------------------------------
/test/inline-configure-file-invalid.md:
--------------------------------------------------------------------------------
1 | # Inline Configure File Invalid
2 |
3 | Not normally too long of a line, but it would have been from an inline config.
4 |
5 |
6 |
--------------------------------------------------------------------------------
/test/inline-configure-file-multiple-instances.md:
--------------------------------------------------------------------------------
1 | # Inline Configure File Multiple Instances
2 |
3 | ***
4 | {MD035:3}
5 |
6 | Trailing spaces:
7 |
8 |
16 |
17 | ***
18 | {MD035:17}
19 |
20 | Trailing spaces:
21 |
22 |
29 |
30 | ***
31 | {MD035:30}
32 |
33 | Trailing spaces:
34 |
--------------------------------------------------------------------------------
/test/inline-configure-file-multiple-lines.md:
--------------------------------------------------------------------------------
1 | # Inline Configure File Multiple Lines
2 |
3 | ***
4 | {MD035:3}
5 |
6 | Trailing spaces:
7 |
8 |
16 |
17 | ***
18 | {MD035:17}
19 |
20 | Trailing spaces:
21 |
--------------------------------------------------------------------------------
/test/inline-configure-file-single-line.md:
--------------------------------------------------------------------------------
1 | # Inline Configure File Single Line
2 |
3 | Not normally too long of a line, but it is here from an inline config. {MD013}
4 |
5 | {MD013}
6 |
--------------------------------------------------------------------------------
/test/inline-configure-file-violations.md:
--------------------------------------------------------------------------------
1 | # Inline Configure File Violations
2 |
3 | Emphasis * with * spaces {MD037}
4 |
5 | Trailing spaces:
6 |
7 |
11 |
--------------------------------------------------------------------------------
/test/inline-disable-enable-file.md:
--------------------------------------------------------------------------------
1 | # Heading
2 |
3 | hard tab {MD010}
4 |
5 | space *in * emphasis {MD037}
6 |
7 | space `in ` code
8 |
9 |
10 |
11 | hard tab
12 |
13 | space *in * emphasis {MD037}
14 |
15 | space `in ` code
16 |
17 |
18 |
19 | hard tab
20 |
21 | space *in * emphasis {MD037}
22 |
23 | space `in ` code {MD038}
24 |
25 |
26 |
27 |
28 | hard tab
29 |
30 | space *in * emphasis {MD037}
31 |
32 | space `in ` code {MD038}
33 |
34 |
37 |
--------------------------------------------------------------------------------
/test/invalid-ul-style-style.md:
--------------------------------------------------------------------------------
1 | # Invalid ul-style style
2 |
3 | * Item {MD004}
4 | * Item {MD004}
5 |
6 | + Item {MD004}
7 | + Item {MD004}
8 |
9 | - Item
10 | - Item
11 |
12 |
17 |
--------------------------------------------------------------------------------
/test/jekyll_post.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Hello World!
4 | category: Meta
5 | tags:
6 | - tag
7 | - another tag
8 | - one more tag
9 | url: https://example.com
10 | excerpt: Hello World! Vestibulum imperdiet adipiscing arcu, quis aliquam dolor condimentum dapibus. Aliquam fermentum leo aliquet quam volutpat et molestie mauris mattis. Suspendisse semper consequat velit in suscipit.
11 | ---
12 | # heading1 {MD025}
13 |
14 | This is just a sample post.
15 |
16 | ### offending heading3 {MD001}
17 |
--------------------------------------------------------------------------------
/test/jekyll_post_2.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Hello World!
4 | category: Meta
5 | tags:
6 | - tag
7 | - another tag
8 | - one more tag
9 | url: http://example.com
10 | excerpt: Hello World! Vestibulum imperdiet adipiscing arcu, quis aliquam dolor condimentum dapibus. Aliquam fermentum leo aliquet quam volutpat et molestie mauris mattis. Suspendisse semper consequat velit in suscipit.
11 | ---
12 |
13 | # header1 {MD025}
14 |
15 | This is just a sample post.
16 |
17 | ### offending header3 {MD001}
18 |
--------------------------------------------------------------------------------
/test/link-fragments-default-case.md:
--------------------------------------------------------------------------------
1 | # Link Fragments Default Case
2 |
3 | ## Heading Name
4 |
5 | [Valid](#heading-name)
6 |
7 | [Invalid](#Heading-Name) {MD051}
8 |
9 | ## Valid *Heading* With _Emphasis_
10 |
11 | [Valid](#valid-heading-with-emphasis)
12 |
13 | [Invalid](#Valid-Heading-With-Emphasis) {MD051}
14 |
15 | ## 🚀 Valid Heading With Emoji
16 |
17 | [Valid](#-valid-heading-with-emoji)
18 |
19 | [Invalid](#-Valid-Heading-With-Emoji) {MD051}
20 |
21 |
24 |
--------------------------------------------------------------------------------
/test/link-fragments-ignore-case.md:
--------------------------------------------------------------------------------
1 | # Link Fragments Ignore Case
2 |
3 | ## Heading Name
4 |
5 | [Valid](#heading-name)
6 |
7 | [Valid](#Heading-Name)
8 |
9 | ## Valid *Heading* With _Emphasis_
10 |
11 | [Valid](#valid-heading-with-emphasis)
12 |
13 | [Valid](#Valid-Heading-With-Emphasis)
14 |
15 | ## 🚀 Valid Heading With Emoji
16 |
17 | [Valid](#-valid-heading-with-emoji)
18 |
19 | [Valid](#-Valid-Heading-With-Emoji)
20 |
21 |
27 |
--------------------------------------------------------------------------------
/test/link-fragments-ignored-pattern-default.md:
--------------------------------------------------------------------------------
1 | # Link Fragments Ignored Pattern Default
2 |
3 | ## Heading
4 |
5 | [Present](#heading)
6 |
7 | [Ignored](#ignored) {MD051}
8 |
9 | [Missing](#missing) {MD051}
10 |
--------------------------------------------------------------------------------
/test/link-fragments-ignored-pattern-empty.md:
--------------------------------------------------------------------------------
1 | # Link Fragments Ignored Pattern Empty
2 |
3 | ## Heading
4 |
5 | [Present](#heading)
6 |
7 | [Ignored](#ignored) {MD051}
8 |
9 | [Missing](#missing) {MD051}
10 |
11 |
16 |
--------------------------------------------------------------------------------
/test/link-fragments-ignored-pattern-multiple.md:
--------------------------------------------------------------------------------
1 | # Link Fragments Ignored Pattern Multiple
2 |
3 | ## Heading
4 |
5 | [Present](#heading)
6 |
7 | [Ignored](#ignored)
8 |
9 | [Missing](#missing)
10 |
11 |
16 |
--------------------------------------------------------------------------------
/test/link-fragments-ignored-pattern-present.md:
--------------------------------------------------------------------------------
1 | # Link Fragments Ignored Pattern Present
2 |
3 | ## Heading
4 |
5 | [Present](#heading)
6 |
7 | [Ignored](#ignored)
8 |
9 | [Missing](#missing) {MD051}
10 |
11 |
16 |
--------------------------------------------------------------------------------
/test/links-with-markup.md:
--------------------------------------------------------------------------------
1 | # links-with-markup
2 |
3 | [This link is plain](link)
4 |
5 | [This link has `code`](link)
6 |
7 | [This link has *some* emphasis](link)
8 |
9 | [This link has **more** emphasis](link)
10 |
11 | [This link has `code` and right space ](link) {MD039}
12 |
13 | [ This link has *emphasis* and left space](link) {MD039}
14 |
15 | [This](link) line has [multiple](link) links.
16 |
17 | [This](line) does [too ](link) and one has a [space](link) {MD039}
18 |
--------------------------------------------------------------------------------
/test/lint-javascript.md:
--------------------------------------------------------------------------------
1 | # Lint JavaScript
2 |
3 |
4 |
5 | Text
6 |
7 | ```js
8 | "use strict";
9 |
10 | var x = 0;
11 |
12 | console.log(x);
13 | ```
14 |
15 | Text
16 |
17 | var y = 0;
18 |
19 | Text
20 |
21 | Text `undefined` text
22 |
23 | Text
24 |
--------------------------------------------------------------------------------
/test/list-indentation-start-indent-indent.md:
--------------------------------------------------------------------------------
1 | # List Indentation start_indent/indent
2 |
3 | * item 1
4 | * item 2
5 | * item 2.1
6 | * item 2.2
7 | * item 2.2.1
8 | * item 2.3
9 | * item 2.3.1 {MD007}
10 | * item 3
11 | * item 4 {MD005} {MD007}
12 |
13 | Text
14 |
15 | * item 1 {MD007}
16 | * item 2 {MD007}
17 | * item 2.1
18 | * item 2.2
19 | * item 2.2.1
20 |
21 | Text
22 |
23 | * item 1
24 | * item 2
25 | * item 2.1 {MD007}
26 | * item 2.2 {MD007}
27 | * item 2.2.1 {MD007}
28 |
29 |
36 |
--------------------------------------------------------------------------------
/test/list-indentation-start-indent-no-indent.md:
--------------------------------------------------------------------------------
1 | # List Indentation start_indent/no indent
2 |
3 | * item 1
4 | * item 2
5 | * item 2.1
6 | * item 2.2
7 | * item 2.2.1
8 | * item 2.3
9 | * item 2.3.1 {MD007}
10 | * item 3
11 | * item 4 {MD005} {MD007}
12 |
13 | Text
14 |
15 | * item 1 {MD007}
16 | * item 2 {MD007}
17 | * item 2.1 {MD007}
18 | * item 2.2 {MD007}
19 | * item 2.2.1 {MD007}
20 |
21 | Text
22 |
23 | * item 1
24 | * item 2
25 | * item 2.1 {MD007}
26 | * item 2.2 {MD007}
27 | * item 2.2.1 {MD007}
28 |
29 |
35 |
--------------------------------------------------------------------------------
/test/list-indentation.md:
--------------------------------------------------------------------------------
1 | # List Indentation
2 |
3 | Text
4 |
5 | - Item
6 | - Item {MD007}
7 | - Item
8 | - Item {MD007}
9 |
10 | Text
11 |
12 | - Item
13 | - Item
14 | - Item
15 | - Item {MD007}
16 |
17 | Text
18 |
19 | - Item
20 | - Item {MD007}
21 | - Item
22 | - Item
23 |
24 | Text
25 |
26 | - Item
27 | - Item
28 | - Item {MD005} {MD007}
29 | - Item
30 | - Item {MD005} {MD007}
31 | - Item {MD005} {MD007}
32 | - Item
33 | - Item
34 | - Item
35 | - Item {MD005} {MD007}
36 | - Item
37 | - Item
38 | - Item {MD007}
39 | - Item {MD007}
40 | - Item {MD007}
41 | - Item
42 | - Item {MD007}
43 | - Item {MD007}
44 | - Item {MD005}
45 |
46 | Text
47 |
48 | ## Invalid Indentation - Should Start at Zero
49 |
50 | - item 1 {MD007}
51 | - item 2 {MD007}
52 | - item 2.1 {MD007}
53 | - item 2.2 {MD007}
54 | - item 2.2.1 {MD007}
55 | - item 2.3 {MD007}
56 | - item 3 {MD007}
57 |
--------------------------------------------------------------------------------
/test/list-syntax-in-paragraph-text.md:
--------------------------------------------------------------------------------
1 | # Heading
2 |
3 | This paragraph has the number
4 | 5. More text.
5 |
6 | This paragraph has the number
7 | 11. More text.
8 |
9 | This non-paragraph has the number
10 | 1. This is a list. {MD032}
11 |
12 | This non-paragraph has the number
13 | 1. This is a list. It also has the number {MD032}
14 | 5. This is a list. {MD029}
15 |
16 | This non-paragraph has spaces and the number
17 | 1. This is a list. {MD030} {MD032}
18 |
19 | This non-paragraph has a dash
20 | - in its list. {MD032}
21 |
22 | This non-paragraph has a dash
23 | - in its list. It also has a plus {MD032}
24 | + in its list. {MD004} {MD032}
25 |
26 | This non-paragraph has spaces and a dash
27 | - This is a list. {MD030} {MD032}
28 |
29 | This is a mixed paragraph that has
30 | 2. followed by text followed by
31 | 1. which creates a list {MD032}
32 | 1. with a couple of items
33 |
34 | Another mixed paragraph
35 | 2. with more text
36 | in the middle of things
37 | 1. before the list {MD032}
38 |
--------------------------------------------------------------------------------
/test/lists-and-headings.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | * list
4 | * list
5 |
6 | # Heading 1
7 |
8 | * list
9 | * list
10 |
11 | # Heading 2 #
12 |
13 | * list
14 | * list
15 |
16 | Heading 3
17 | =========
18 |
19 | * list
20 | * list
21 |
22 |
25 |
--------------------------------------------------------------------------------
/test/lists-incomplete.md:
--------------------------------------------------------------------------------
1 | # Lists Incomplete
2 |
3 | Text
4 |
5 | - Item
6 | -
7 |
8 | Text
9 |
10 | -
11 | - Item
12 |
13 | Text
14 |
15 | - Item
16 | -
17 | - Item
18 |
19 | Text
20 |
21 | - Item
22 | -
23 | -
24 |
25 | Text
26 |
27 | 1. Item
28 | 1.
29 |
30 | Text
31 |
32 | 1.
33 | 1. Item
34 |
35 | Text
36 |
37 | 1. Item
38 | 1.
39 | 1. Item
40 |
41 | Text
42 |
43 | 1. Item
44 | 1.
45 | 1.
46 |
47 | Text
48 |
49 | {MD047}
--------------------------------------------------------------------------------
/test/lists-on-a-line.md:
--------------------------------------------------------------------------------
1 | # Lists on a Line
2 |
3 | ## Correct
4 |
5 | Text
6 |
7 | * * Item
8 |
9 | Text
10 |
11 | * * * Item
12 |
13 | Text
14 |
15 | - + * Item
16 |
17 | Text
18 |
19 | - 1. Item
20 |
21 | Text
22 |
23 | - 1. + Item
24 |
25 | Text
26 |
27 | * * * Item
28 | * Item
29 | * Item
30 | * Item
31 |
32 | ## Incorrect
33 |
34 | Text
35 |
36 | * * Item {MD007}
37 |
38 | Text
39 |
40 | * * * Item {MD007}
41 |
42 | Text
43 |
44 | - + * Item {MD007}
45 |
46 | Text
47 |
48 | - 1. Item {MD007}
49 |
50 | Text
51 |
52 | - 1. + Item {MD007}
53 |
54 | Text
55 |
56 | * * * Item {MD007}
57 | * Item {MD005} {MD007}
58 | * Item {MD005} {MD007}
59 | * Item {MD005} {MD007}
60 |
61 |
64 |
--------------------------------------------------------------------------------
/test/lists-with-commented-items.md:
--------------------------------------------------------------------------------
1 | # Lists with Commented Items
2 |
3 | Text
4 |
5 | - item
6 | - item
7 |
11 | - item
12 | - item
13 |
14 | Text
15 |
16 | - item
17 | - item
18 |
20 | - item
21 | - item
22 |
23 | Text
24 |
25 | - item
26 |
27 | - item
28 |
29 | Text
30 |
31 | - item
32 | - item
33 |
34 |
35 | - item
36 | - item
37 |
38 | Text
39 |
--------------------------------------------------------------------------------
/test/lists-with-fenced-code-tight.md:
--------------------------------------------------------------------------------
1 | # Lists with Fenced Code, Tight
2 |
3 | - Item
4 |
5 | ```text
6 | fence
7 | ```
8 |
9 | - Item
10 | - Item
11 |
12 | ```text
13 | fence
14 | ```
15 |
16 | - Item
17 |
18 | Text
19 |
20 | - Item
21 | ```text
22 | fence
23 | ```
24 | - Item
25 | - Item
26 | ```text
27 | fence
28 | ```
29 | - Item
30 |
31 | Text
32 |
33 | 1. Item
34 |
35 | ```text
36 | fence
37 | ```
38 |
39 | 1. Item
40 | 1. Item
41 |
42 | ```text
43 | fence
44 | ```
45 |
46 | 1. Item
47 |
48 | Text
49 |
50 | 1. Item
51 | ```text
52 | fence
53 | ```
54 | 1. Item
55 | 1. Item
56 | ```text
57 | fence
58 | ```
59 | 1. Item
60 |
61 |
66 |
--------------------------------------------------------------------------------
/test/lists-with-fenced-code.md:
--------------------------------------------------------------------------------
1 | # Lists with Fenced Code
2 |
3 | - Item
4 |
5 | ```text
6 | fence
7 | ```
8 |
9 | - Item
10 | - Item
11 |
12 | ```text
13 | fence
14 | ```
15 |
16 | - Item
17 |
18 | Text
19 |
20 | - Item
21 | ```text
22 | fence {MD031:-1} {MD031:+1}
23 | ```
24 | - Item
25 | - Item
26 | ```text
27 | fence {MD031:-1} {MD031:+1}
28 | ```
29 | - Item
30 |
31 | Text
32 |
33 | 1. Item
34 |
35 | ```text
36 | fence
37 | ```
38 |
39 | 1. Item
40 | 1. Item
41 |
42 | ```text
43 | fence
44 | ```
45 |
46 | 1. Item
47 |
48 | Text
49 |
50 | 1. Item
51 | ```text
52 | fence {MD031:-1} {MD031:+1}
53 | ```
54 | 1. Item
55 | 1. Item
56 | ```text
57 | fence {MD031:-1} {MD031:+1}
58 | ```
59 | 1. Item
60 |
61 | Text
62 |
63 | 1. Text
64 |
65 | ```text
66 | code
67 |
68 | Text
69 |
70 | 1. Text
71 | ```shell
72 | fence {MD031:-1} {MD031} {MD031:+1} {MD032} {MD040:+1}
73 | ```
74 |
--------------------------------------------------------------------------------
/test/long-heading-exceptions.md:
--------------------------------------------------------------------------------
1 | # Heading
2 |
3 | Text
4 |
5 | ## Heading heading heading heading heading heading heading heading heading heading heading heading heading heading heading heading
6 |
7 | Text
8 |
9 | Text text text text text text text text text text text text text text text text text text text text text text text text {MD013}
10 |
11 | ## Heading heading
12 |
13 | Text
14 |
15 | Text text text text text text text text text text text text text text text text text text text text text text text text {MD013}
16 |
17 | ### Heading heading heading heading heading heading heading heading heading heading heading heading heading heading heading heading heading
18 |
19 | Text
20 |
21 | Text text text text text text text text text text text text text text text text text text text text text text text text {MD013}
22 |
23 |
28 |
--------------------------------------------------------------------------------
/test/long-lines-long-reference-definitions.md:
--------------------------------------------------------------------------------
1 | # Long Lines Long Reference Definitions
2 |
3 | [Link][short-reference-definition]
4 |
5 | [Link][long-reference-definition]
6 |
7 | [Link][long-reference-definition-split]
8 |
9 | ![Image][long-reference-definition-image]
10 |
11 | [short-reference-definition]: https://example.com/short
12 | [long-reference-definition]: https://example.com/long/long/long/long/long/long/long/long/long/long/long/long/long
13 | [long-reference-definition-split]:
14 | https://example.com/long/long/long/long/long/long/long/long/long/long/long/long/long/long
15 | [long-reference-definition-image]: https://example.com/long/long/long/long/long/long/long/long/long/long/long/long/long/image
16 |
17 | [long-reference-definition]: https://example.com/long/long/long/long/long/long/long/long/long/long/long/long/long
18 |
19 |
--------------------------------------------------------------------------------
/test/long-lines-short-code.md:
--------------------------------------------------------------------------------
1 | # Long Lines, Short Code
2 |
3 | Text text text text text text text text text text text text text text text
4 |
5 | Text text text text text text text text text text text text text text text text text {MD013}
6 |
7 | Text
8 |
9 | Code code code code
10 |
11 | Text
12 |
13 | Code code code code code code code {MD013}
14 |
15 | Text
16 |
17 | ```text
18 | Code code code code code
19 | ```
20 |
21 | Text
22 |
23 | ```text
24 | Code code code code code code code code {MD013}
25 | ```
26 |
27 |
33 |
--------------------------------------------------------------------------------
/test/long-lines-short-headings.md:
--------------------------------------------------------------------------------
1 | # Long Lines, Short Headings
2 |
3 | Text text text text text text text text text text text text text text text text text {MD013}
4 |
5 | ## Short heading text text text
6 |
7 | Text
8 |
9 | ## Long heading text text text {MD013}
10 |
11 | Text
12 |
13 | ## Long heading text text {MD013} ##
14 |
15 | Text
16 |
17 | Long heading of text text text text text text {MD013}
18 | -----------------------------------------------------
19 |
20 | Text
21 |
22 |
28 |
--------------------------------------------------------------------------------
/test/long_lines_100.md:
--------------------------------------------------------------------------------
1 | # long_lines_100
2 |
3 | This is a very very very very very very very very long line over 80 chars but less than 100
4 |
5 | This is a very very very very very very very very very very long line over 80 chars, and also over 100. {MD013}
6 |
7 | This is a very very very very very very very very very long line that is exactly 100 characters long
8 |
9 | This line however, while very long, doesn't have whitespace after the 100th columnwhichallowsforURLsandotherlongthings.
10 |
11 |
16 |
--------------------------------------------------------------------------------
/test/markdown-extra-footnote.md:
--------------------------------------------------------------------------------
1 | # Heading
2 |
3 | Text with Markdown Extra footnote[^1]
4 |
5 | Text with (parenthesized footnote)[^2]
6 |
7 | This is not a (parenthesized footnote)[x^y] {MD011}
8 |
9 | Nor (is this)[z] {MD011}
10 |
11 | [^1]: Footnote
12 | [^2]: Another footnote
13 |
--------------------------------------------------------------------------------
/test/markdown-in-html.md:
--------------------------------------------------------------------------------
1 | # Markdown in HTML
2 |
3 | Text
4 |
5 | + Item
6 |
7 | Text
8 |
9 |
10 | ## Heading 2a
11 | - Text *text* text * text * text ** text ** text `text` text ` text ` text
12 | - Text https://example.com/ [ link ](https://example.com/)
13 |
14 |
15 |
16 | ### Heading 3a ###
17 | Text
18 |
19 |
20 | Text
21 |
22 |
23 |
24 | ## Heading 2b {MD019} {MD022}
25 | - Text *text* text * text * text ** text ** text `text` text ` text ` text {MD004} {MD007} {MD032} {MD037} {MD038}
26 | - Text https://example.com/ [ link ](https://example.com/) {MD004} {MD005} {MD034} {MD039}
27 |
28 |