mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update MD040/fenced-code-language to add allowed_languages parameter (fixes #610).
This commit is contained in:
parent
c333976a44
commit
01ba757d3a
12 changed files with 199 additions and 9 deletions
|
@ -1571,6 +1571,8 @@ Tags: code, language
|
|||
|
||||
Aliases: fenced-code-language
|
||||
|
||||
Parameters: allowed_languages (array of string; default [])
|
||||
|
||||
This rule is triggered when fenced code blocks are used, but a language isn't
|
||||
specified:
|
||||
|
||||
|
@ -1598,6 +1600,9 @@ Plain text in a code block
|
|||
```
|
||||
````
|
||||
|
||||
You can configure the `allowed_languages` parameter to specify a list of
|
||||
languages code blocks could use. The default value is `[]` which means any language specifier is valid.
|
||||
|
||||
Rationale: Specifying a language improves content rendering by using the
|
||||
correct syntax highlighting for code. More information:
|
||||
<https://cirosantilli.com/markdown-style-guide#option-code-fenced>.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue