SGML

Markdown Ruler Examples

ruler0 ruler1 ruler2
Basic ruler examples
ruler4 , ruler5
Ruler vs. Setext-style header recognition
ruler-in-codeblock0
Rulers in code blocks
ruler-closing-paragraph
Rulers closing paragraphs
Note: To produce HTML from the example markdown sources, copy and paste an example source, store it into a file with the ".md" file extension, and invoke
sgmlproc <your-file.md>
where <your-file.md> is replaced by the actual file used for storing.

ruler0

A Paragraph.

* * *

Separated by a ruler from the subsequent paragraph.

Rendered HTML

<p>A Paragraph.
</p><hr>
<p>Separated by a ruler from the subsequent paragraph.
</p>

ruler1

A Paragraph.
* * *

Separated, without blank line before it, by a ruler from the
subsequent paragraph.

Rendered HTML

<p>A Paragraph.
</p><hr>
<p>Separated, without blank line before it, by a ruler from the
subsequent paragraph.
</p>

ruler2

A Paragraph.
* * *
separated, without any blank line at all, by a ruler from the
subsequent paragraph.

Rendered HTML

<p>A Paragraph.
</p><hr>
<p>separated, without any blank line at all, by a ruler from the
subsequent paragraph.
</p>

ruler4

A setext header
---
Rather than a ruler

Rendered HTML

<h2 id="a-setext-header">A setext header
</h2><p>Rather than a ruler
</p>
,

ruler5

Unlike `***`  and `___`, for `---` to be recognized as ruler,

---

it must be preceded by a blank line. 
`- - -`, on the other hand, is always recognized as ruler:
- - -

Rendered HTML

<p>Unlike <code>&#42;&#42;&#42;</code>  and <code>&#95;&#95;&#95;</code>, for <code>---</code> to be recognized as ruler,
</p><hr>
<p>it must be preceded by a blank line. 
<code>- - -</code>, on the other hand, is always recognized as ruler:
</p><hr>

ruler-in-codeblock0

Lines with any of the following character sequences as sole content

		* * *
		- - -
		_ _ _
		
		***
		---
		___


get rendered as HTML `hr` elements.

Note that "---" rulers are only recognized after blank lines
to de-ambiguate from setext-style headers.

Rendered HTML

<p>Lines with any of the following character sequences as sole content
</p><pre><code>	* * *
	- - -
	_ _ _

	***
	---
	___
</code></pre><p>get rendered as HTML <code>hr</code> elements.
</p><p>Note that "---" rulers are only recognized after blank lines
to de-ambiguate from setext-style headers.
</p>

ruler-closing-paragraph

The running paragraph is closed on/before a ruler.
***

Rendered HTML

<p>The running paragraph is closed on/before a ruler.
</p><hr>