https://bugzilla.wikimedia.org/show_bug.cgi?id=70791
Bug ID: 70791
Summary: When inserting new content before headings, insert an
extra newline for WT readability
Product: Parsoid
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: serializer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Web browser: ---
Mobile Platform: ---
Heading constraints could use tweaking to make sure that content before
existing headings leaves an extra newline for readability even though the
heading is not a new heading. We already serialize newly inserted headings
correctly. Discovered by looking at serialized output of the
[[mw:Parsoid/Deployments]] page.
See shell session below that shows the problem.
-------------------------
[subbu@earth tests] echo "==A==\na" > /tmp/wt
[subbu@earth tests] node parse < /tmp/wt > /tmp/old.html
[subbu@earth tests] sed 's/<h2>/<h2>NEW<\/h2>\n<p>new<\/p>\n<h2>/g;' <
/tmp/old.html > /tmp/new.html
[subbu@earth tests] node parse --html2wt < /tmp/new.html
==A==
a
[subbu@earth tests] sed 's/<h2/<h2>NEW<\/h2>\n<p>new<\/p>\n<h2/g;' <
/tmp/old.html > /tmp/new.html
[subbu@earth tests] node parse --html2wt < /tmp/new.html
== NEW ==
new
==A==
a
[subbu@earth tests] node parse --selser --oldhtmlfile /tmp/old.html
--oldtextfile /tmp/wt < /tmp/new.html
== NEW ==
new
==A==
a
-------------------------
[subbu@earth tests] echo
"<h2>y</h2>\n<p>bar</p>\n<h2>x</h2>\n<p>foo</p>\n<h2>boo</h2>\n<p>bar</p>" |
node parse --html2wt
== y ==
bar
== x ==
foo
== boo ==
bar
-------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l