You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commonmark supports setext headings which allows user to put multiple lines as heading content.
This is a
Setext Heading
==============
In this way, multi line heading has at least one line of spacer with multiple = characters and they cannot be used without this spacer line. ATX heading in Commonmark can only span one line, so it can be used without any spacer line.
# ATX Heading
This doesn't belong to heading
Implementation
* Multi line
Heading Title
This is not a heading
* Single line Heading *
This is not a heading
We can have similar syntax by specifying heading title as a paragraph and introducing heading closing modifier. Now you can use *\n to explicitly end the heading title.
This allows both heading and paragraph divided by line and *heading spanning only one line (no spacer line between) in same grammar base, which is way better than CommonMark's implementation.
You can think this syntax as a block style heading used in many programming langauges' comment section.
//// heading in comments ////
*** level 3 heading in Norg ***
As we already defined the level in heading prefix, suffix characters can repeated in any amount of times (including 0!)
Examples
Here is a list of valid syntax with this rule:
* Lv 1 Heading ******
Paragraph
****** Lv 6 Heading *
Paragraph
* Heading
in
multiple
line *
Paragraph
The text was updated successfully, but these errors were encountered:
Commonmark supports setext headings which allows user to put multiple lines as heading content.
In this way, multi line heading has at least one line of spacer with multiple
=
characters and they cannot be used without this spacer line. ATX heading in Commonmark can only span one line, so it can be used without any spacer line.Implementation
We can have similar syntax by specifying heading title as a paragraph and introducing heading closing modifier. Now you can use
*\n
to explicitly end the heading title.This allows both heading and paragraph divided by line and *heading spanning only one line (no spacer line between) in same grammar base, which is way better than CommonMark's implementation.
You can think this syntax as a block style heading used in many programming langauges' comment section.
As we already defined the level in heading prefix, suffix characters can repeated in any amount of times (including 0!)
Examples
Here is a list of valid syntax with this rule:
The text was updated successfully, but these errors were encountered: