ATX-style headings
An ATX-style heading consists of one to six #
signs and a line of text, optionally followed by any number of #
signs. The number of #
signs at the beginning of the line is the heading level:
## A level-two heading
As with setext-style headings, the heading text can contain formatting:
# A level-one heading with a [link](/url) and *emphasis*
Standard Markdown syntax does not require a blank line before a heading. Pandoc does require this (except, of course, at the beginning of the document). The reason for the requirement is that it is all too easy for a #
to end up at the beginning of a line by accident (perhaps through line wrapping). Consider, for example:
I like several of their flavors of ice cream:
#22, for example, and #5.
Many Markdown implementations do not require a space between the opening #
s of an ATX heading and the heading text, so that #5 bolt
and #hashtag
count as headings. With this extension, pandoc does require the space.