Page MenuHomePhabricator

Formatter: Subsequent H1s swallowed by previous h2.
Closed, ResolvedPublic

Description

1

1.1

1.2

2

2.1

2.2

h1

hello


Version: unspecified
Severity: normal

Details

Reference
bz52858

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:46 AM
bzimport set Reference to bz52858.
bzimport added a subscriber: Unknown Object (MLST).

Create a page with the above wikitext.

the heading 'h1' is swallowed by the section 2.2.

What should probably happen is that the h1 should terminate the section.

I'd rather we didn't make our existing regular expression more complicated and instead did something more clever with the ParserOutput so that it returns an array of sections rather than bodytext (see bug 48551)

I guess the best thing would be for pages which contain h1s is to make the h1s rather than the h2 collapsible otherwise the full article cannot be edited.

This would require a big rewrite of the formatter code though and using parser output instead of a big regex..

I5e8d723d061f7003599b2a7f639bbe1301ba92e0 took care of this - they now collapse on h1s when present.