mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
36 lines
1,007 B
Markdown
36 lines
1,007 B
Markdown
![]() |
This check looks for instances where emphasized (i.e. bold or italic) text is
|
||
|
used to separate sections, where a heading should be used instead:
|
||
|
|
||
|
```markdown
|
||
|
**My document**
|
||
|
|
||
|
Lorem ipsum dolor sit amet...
|
||
|
|
||
|
_Another section_
|
||
|
|
||
|
Consectetur adipiscing elit, sed do eiusmod.
|
||
|
```
|
||
|
|
||
|
To fix this, use Markdown headings instead of emphasized text to denote
|
||
|
sections:
|
||
|
|
||
|
```markdown
|
||
|
# My document
|
||
|
|
||
|
Lorem ipsum dolor sit amet...
|
||
|
|
||
|
## Another section
|
||
|
|
||
|
Consectetur adipiscing elit, sed do eiusmod.
|
||
|
```
|
||
|
|
||
|
Note: This rule looks for single-line paragraphs that consist entirely
|
||
|
of emphasized text. It won't fire on emphasis used within regular text,
|
||
|
multi-line emphasized paragraphs, or paragraphs ending in punctuation
|
||
|
(normal or full-width). Similarly to rule MD026, you can configure what
|
||
|
characters are recognized as punctuation.
|
||
|
|
||
|
Rationale: Using emphasis instead of a heading prevents tools from inferring
|
||
|
the structure of a document. More information:
|
||
|
<https://cirosantilli.com/markdown-style-guide#emphasis-vs-headers>.
|