wdpr
    Preparing search index...

    Module parser/rules/inline/line-break

    Parses the various Wikidot line-break syntaxes.

    Wikidot supports three distinct mechanisms for producing <br /> elements:

    1. Implicit newline: a single NEWLINE token within a paragraph becomes a <br />, unless it precedes a block-level element (heading, list, blockquote, etc.) or another newline (paragraph break).

    2. Backslash at end of line: \ followed by newline. The preprocessor converts \\\n to a BACKSLASH_BREAK token (U+E000), which this rule then handles. Wikidot preserves a space after the line break in this case.

    3. Underscore at end of line: _ followed by newline, or _ at the start of a line followed by newline. This is a more explicit line-break syntax.

    All three rules mark their line-break elements with _preservedTrailingBreak when the break was explicitly requested (backslash or underscore syntax), so the paragraph postprocessor knows not to strip trailing breaks.

    The newline rule suppresses line-breaks in several situations to avoid spurious <br /> elements before block-level constructs.

    Variables

    backslashLineBreakRule
    newlineLineBreakRule
    underscoreLineBreakRule