DESCRIPTION

This test is about matching paragraph lines that end with at least two spaces, and inserting a hard line-break after such lines. Paragraph lines are text lines that include at least one non-white-space character, and that aren't headings or rulers or within code blocks. When a hard line-break is found, the current paragraph remains current — the same paragraph. There is no splitting into two paragraphs, as it would happen instead if an empty line was used to split the paragraph. A hard line-break can also be used with elements inside the paragraph. It will not split the current element. For instance, a bullet list item, in which the hard line-break occurs, does not split the sequential list in two, and does not split the current paragraph.

TESTS

See also heading and hard line-break (test file)


TEST multi-line HTML comment + line break + heading 3...

br

test heading

RESULT three lines: “br” (regular text), empty line, “test heading” (H3)


TEST paragraph 1 ...

line 1 line 2 line 3

RESULT one text line: “line 1 line 2 line 3”


TEST paragraph 2 ...

line 1 line 2
line 3

RESULT two text lines (same paragraph): “line 1 line 2”, “line 3”

By contrast, these are two text lines and two paragraphs:

line 1 line 2

line 3


TEST - with smart quotes ...

“1” “2”
“3”

RESULT two text lines (same paragraph): “1” “2”, “3”


TEST - bullets ...

1
2

  • 3 (bullet, does not join 2)
  • 10 11 (joins with 10)
  • 20
    21 (below 20)
  • 30
    31 (below 30)
  • line 1 BR 2

    (empty line above) BR 3

    RESULT HTML:

    1

    2

  • 3 (bullet, does not join 2)
  • 10 11 (joins with 10)
  • 20
  • 21 (below 20)
  • 30
  • 31 (below 30)

    line 1 BR 2

    (empty line above) BR 3


    TEST - line break after auto-code ...

    /file/file
    #bugs#bugs
    email@test.comemail@test.com
    function()function()
    _IDENTIFIER_IDENTIFIER

    RESULT two non-aligned columns of code elements


    TEST - line break after bolded auto-code ...

    /file/file
    #bugs#bugs
    email@test.comemail@test.com
    function()function()
    _IDENTIFIER_IDENTIFIER

    RESULT two non-aligned columns of code elements; non-bold left, bold right


    TEST - TODO ...

    RESULT TODO


    TEST - line break from exec ... (run this test with mdview -x)

    “br1”
    br2
    BR

    test heading

    RESULT a three-line paragraph): ““br1””, “br2”, and “BR ”; then an H3 heading: “test heading”


    PASS if all RESULT lines above are true