Skip to content

Exclude code block style from Markdownlint - #1530

Merged
waylan merged 1 commit into
masterfrom
MD046
Jul 3, 2018
Merged

waylan merged 1 commit into
masterfrom
MD046

Conversation

@waylan

@waylan waylan commented Jul 3, 2018

Copy link
Copy Markdown
Contributor

The Python-Markdown parser includes support for fenced code blocks, but only at the root level of the document. Therefore, a code block nested in a list item must be an indented block. At the same time, MkDocs' code highlighting relies on the language identifier in fenced code blocks to avoid bad guesses. Given the above, we want to allow mixing both styles of code blocks and the way to allow that is to disable Markdown Lint rule MD046.

This new rule was introduced in Markdownlint version 0.5.0 and is currently causing the tests to fail. This was first discovered in #1526.

The Python-Markdown parser includes support for fenced code blocks, but only at the root level of the document. Therefore, a code block nested in a list item must be an indented block. At the same time, MkDocs' code highlighting relies on the language identifier in fenced code blocks to avoid bad guesses. Given the above, we want to allow mixing both styles of code blocks and the way to allow that is to disable Markdown Lint [rule MD046](https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md#md046---code-block-style).

This new rule was introduced in Markdownlint version [0.5.0](https://github.com/markdownlint/markdownlint/blob/master/CHANGELOG.md#v050) and is currently causing the [tests to fail](https://travis-ci.org/mkdocs/mkdocs/jobs/399711017). This was first discovered in #1526.
@waylan

waylan commented Jul 3, 2018

Copy link
Copy Markdown
Contributor Author

Another reason to exclude this rule is that Admonitions cause it to fail. See markdownlint/markdownlint#215.

@waylan
waylan merged commit 6f3257c into master Jul 3, 2018
@waylan
waylan deleted the MD046 branch July 3, 2018 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant