Update MD041/first-line-heading to recognize HTML headings (fixes #366).

This commit is contained in:
David Anson 2021-01-31 15:48:00 -08:00
parent c7d2416f95
commit 1d042aa3fd
7 changed files with 69 additions and 4 deletions

View file

@ -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.