A theme break (a horizontal rule) is written as three or more dashes, underscores, or asterisks. These may be preceded by up to three spaces. (When rendered with pegdown or pandoc they usually must be preceded by a blank line, and followed by a blank line.)
This is a block element that cannot contain inline elements.
Written as:
---
___
***
Rendered as:
Too few marks do not work:
--
__
**
The marks may be interspersed with spaces, but not any other characters.
Written:
- - -
_ _ _
* * *
A theme break may appear before or after a header with the usual blank lines.
#### Header 4
---
#### Another header
Header 2
---
---
Header 2 again
---
Theme breaks do not interrupt paragraphs (dashes may be interpreted as setext headings). A blank line is required.
Some text.
---
More text.
___
Yet more.
***
More text. ___
Yet more. ***
A theme break may appear before or after a fenced code block or an indented code block, with the usual blank lines.
~~~
generate y = x
~~~
***
~~~
summarize y
~~~
generate y = x
***
summarize y
generate y = x
summarize y
generate y = x
summarize y
A theme break requires a blank line before or after a table.
***
column 1 | column 2
---------|---------
value 1 | value 2
---
column 1 | column 2 |
---|---|
value 1 | value 2 |
A theme break may appear before a block quote with a blank line. After a block quote a blank line is required (because block quotes have lazy continuation).
> Quoted text.
---
> More quotes.
Quoted text.
More quotes.
A theme break may appear within a block quote in pegdown, with quoted blank lines, but not in pandoc.
Written:
> ***
>
> quoted
>
> ***
>
> text
Rendered:
quoted
text
A theme break may appear before or after a list with blank lines.
- list 1
---
- list 2
A theme break may be contained in a list, if it is composed of characters that contrast with the list item marker. Notice using the same character as a list item and as a theme break yields a pure theme break, interrupting the list.
Written:
- item 1, list 1
- ***
- ---
- ___
- item 2, list 2
* ***
Rendered:
item 1, list 1