If a NEWLINE follows the opening tag, parse body as block content
with the collapsible rule itself removed (to prevent nesting).
Otherwise, parse inline content until close tag or end of line
(inline form).
Merge consecutive paragraphs in the body via mergeParagraphs().
Consume the [[/collapsible]] closing tag.
Consume any orphaned [[/collapsible]] tags that follow, converting
them to <br /> + literal text.
Derive show-top / show-bottom booleans from the hideLocation
attribute.
Block rule for
[[collapsible ...]]...[[/collapsible]].Parsing strategy:
mergeParagraphs().[[/collapsible]]closing tag.[[/collapsible]]tags that follow, converting them to<br />+ literal text.show-top/show-bottombooleans from thehideLocationattribute.