wdpr
    Preparing search index...

    Module parser/rules/block/collapsible

    Block rule for Wikidot collapsible blocks: [[collapsible]]...[[/collapsible]].

    A collapsible renders as a show/hide toggle with body content that can be expanded or collapsed. The opening tag accepts several attributes (which may span multiple lines):

    • show -- label text for the "show" link (default: "+ show block").
    • hide -- label text for the "hide" link (default: "- hide block").
    • folded -- when "no", the block starts in the expanded state.
    • hideLocation -- where the toggle link appears: "top" (default), "bottom", "both", or "neither"/"none".

    Key Wikidot-specific behaviours:

    • Collapsibles cannot nest. When the body parser encounters a second [[collapsible]], it is treated as plain text. This is achieved by filtering the collapsible rule out of the block rule list for body parsing.
    • Orphaned [[/collapsible]] tags after the matched close are consumed and emitted as <br /> + literal text, matching Wikidot rendering.
    • An inline form ([[collapsible]]text[[/collapsible]] on one line) is supported but uncommon.
    • Consecutive paragraph containers in the body are merged back into a single paragraph via mergeParagraphs, because Wikidot does not split paragraphs at unrecognised block tokens inside a collapsible.

    Variables

    collapsibleRule