Headings

mdview supports two heading formats:

  • Atx-style headings. Levels 1-3 headings comprise one to three # characters followed by the heading text.
  • Setext-style headings. Level 1 headings are specified by underlining the heading with a row of = characters, and level 2 headings are specified by underlining with a row of - characters. Setext-style headings only support level 1 and level 2 headings.

  • Examples:

    Heading 1

    This is also heading 1

    Heading 2

    This is also heading 2

    Heading 3


    Headings and white space

    Markdown specifications aren't clear about the interaction between white space and headings, so implementations differ. For compatibility, authors should add an empty line before and after the heading.

    Without empty lines, mdview behaves as documented below. Notice that by using hard line-breaks, you can create multi-line headings. This is a non-standard feature.


    BR  
    text
    ====

    becomes (HTML)

    BR

    text


    # BR
    text
    ====

    becomes (HTML)

    BR

    text


    # BR  
    text
    ====

    becomes (HTML)

    BR

    text ====

    BR  
    text
    ====

    becomes (HTML)

    BR

    text

    heading and hard line-break (test file)