mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update MD041/first-line-heading to recognize HTML headings (fixes #366).
This commit is contained in:
parent
c7d2416f95
commit
1d042aa3fd
7 changed files with 69 additions and 4 deletions
10
doc/Rules.md
10
doc/Rules.md
|
@ -1588,6 +1588,16 @@ To fix this, add a top-level heading to the beginning of the file:
|
|||
This is a file with a top-level heading
|
||||
```
|
||||
|
||||
Because it is common for projects on GitHub to use an image for the heading of
|
||||
`README.md` and that is not well-supported by Markdown, HTML headings are also
|
||||
permitted by this rule. For example:
|
||||
|
||||
```markdown
|
||||
<h1 align="center"><img src="https://placekitten.com/300/150"/></h1>
|
||||
|
||||
This is a file with a top-level HTML heading
|
||||
```
|
||||
|
||||
Note: The `level` parameter can be used to change the top-level (ex: to h2) in cases
|
||||
where an h1 is added externally.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue