Fossil-FossMD

This is a test for TOC - 1st header 1
Login

This is a test for TOC - 1st header 1

{toc}

[toc]

[[toc]]

@toc

Here goes some text after 1st h1.

Test from command line:

    ffmd test-markdown-render toc-test.md

1st h1 (ATX)

1st h2 (ATX)

Here goes some text after 1st h2.

1st h3 (ATX)

Here goes some text after 1st h3.

2nd h2 (ATX)

2nd h3 (ATX)

Here goes some text after 2nd h3.

Alternative Top Level Heading (setext-style)

Alternative 2nd Level Heading (setext-style)

HTML Headers 1 to 6 (this is 2) are also allowed, and should be considered.

HTML Headers 1 to 6 (this is 3) are also allowed, and should be considered.

HTML Headers 1 to 6 (this is 4) are also allowed, and should be considered.

HTML Headers 1 to 6 (this is 5) are also allowed, and should be considered.

HTML Headers 1 to 6 (this is 6) are also allowed, and should be considered.

3rd h2 (ATX)

3rd h3 (ATX)

h4 (ATX)

h5 (ATX)
h6 (ATX)

A horisontal rule is, according to is_hrule(), either a line of * or - or _ or (space):




The lines below should be all be rendered as empty <h1></h1> (Header 1) headers.

The lines below should be all be rendered as <hr> (horisontal rule).
Note especially when there are 2 or more lines, the two lines should not be interpreted as an setext-style 2nd Level Heading (see above).
That is, 2 consecutive Markdown lines:

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

should be HTML rendered as:

<hr>
<hr>

and not as:

<h2><hr></h2>

While the Fossil Markdown renderes this correctly, a bug in ToC includes the first line as a ToC entry.