Thematic breaks

A line consisting of 0-3 spaces of indentation, followed by a sequence of three or more matching -_, or *characters, each followed optionally by any number of spaces or tabs, forms a thematic break.

Wrong characters:

Not enough characters:

One to three spaces indent are allowed:

Four spaces is too many:

More than three characters may be used:

Spaces are allowed between the characters:

Spaces are allowed at the end:

However, no other characters may occur in the line:

It is required that all of the non-whitespace characters be the same. So, this is not a thematic break:

Thematic breaks do not need blank lines before or after:

Thematic breaks can interrupt a paragraph:

If a line of dashes that meets the above conditions for being a thematic break could also be interpreted as the underline of a setext heading, the interpretation as a setext heading takes precedence. Thus, for example, this is a setext heading, not a paragraph followed by a thematic break:

When both a thematic break and a list item are possible interpretations of a line, the thematic break takes precedence:

If you want a thematic break in a list item, use a different bullet: