We need to enforce single-line syntactical context in headings and other line-based constructs (lists, paragraphs, etc pp).
Simple test case:
echo -e '<h2>\nfoo</h2>' | node parse --html2wt == foo==
We need to enforce single-line syntactical context in headings and other line-based constructs (lists, paragraphs, etc pp).
Simple test case:
echo -e '<h2>\nfoo</h2>' | node parse --html2wt == foo==
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Enforce single-line context in the serializer | mediawiki/services/parsoid | master | +62 -5 |
This also happens in practice. Dogfooding example:
https://www.mediawiki.org/w/index.php?title=User%3AGWicke&diff=723931&oldid=655405
See also bug 51444. I'm not merging these bugs because 51444 is filed against VE, and I'm not sure that VE is blameless here (for including the newline in the heading to begin with).
Change 196246 had a related patch set uploaded (by Arlolra):
Enforce single-line context in the serializer