Add MD036 with tests.

This commit is contained in:
David Anson 2015-04-14 22:37:56 -07:00
parent 762d8425ca
commit bd7e712728
5 changed files with 102 additions and 3 deletions

View file

@ -765,3 +765,32 @@ rules are different than the first one encountered in the document. If you
want to configure the rule to match a specific style, the parameter given to
the 'style' option is a string containing the exact horizontal rule text that
is allowed.
## MD036 - Emphasis used instead of a header
Tags: headers, emphasis
This check looks for instances where emphasized (i.e. bold or italic) text is
used to separate sections, where a header should be used instead:
**My document**
Lorem ipsum dolor sit amet...
_Another section_
Consectetur adipiscing elit, sed do eiusmod.
To fix this, use markdown headers instead of emphasized text to denote
sections:
# My document
Lorem ipsum dolor sit amet...
## Another section
Consectetur adipiscing elit, sed do eiusmod.
Note: this rule looks for paragraphs that consist entirely of emphasized text.
It won't fire on emphasis used within regular text.