Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/165749
Change subject: WIP: Document differences in HTML fixup between tidy and Parsoid. ...................................................................... WIP: Document differences in HTML fixup between tidy and Parsoid. Not sure that tidy's solution (<-escaping bad tags) is the best, but Parsoid's current approach is also bad. Bug: 71473 Change-Id: I61ba760474ed622d816edcd875046ba395e3927c --- M tests/parserTests.txt 1 file changed, 73 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/49/165749/1 diff --git a/tests/parserTests.txt b/tests/parserTests.txt index eb14249..060e639 100644 --- a/tests/parserTests.txt +++ b/tests/parserTests.txt @@ -21413,6 +21413,79 @@ <object data="test.swf"></object> !!end +!! test +Leaky <li> (1) +!! options +parsoid=wt2html +!! wikitext +<ol> +<li>a<small>b</li> +<li>c</li> +</ol> +!! html+tidy +<ol> +<li>a<small>b</li></small></li> +<li><small>c</small> +<p><small></ol></small></p> +</li> +</ol> +!! html/parsoid +<ol> +<li>a<small>b</small></li> +<small> +<li>c</li> +</small></ol> +!! end + +!! test +Leaky <li> (2) +!! options +parsoid=wt2html +!! wikitext +== Leaky LI == +<li>A +<li>B <small> C +<li>D + +== Next Heading == +x +!! html/php+tidy +<h2><span class="mw-headline" id="Leaky_LI">Leaky LI</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Leaky LI">edit</a><span class="mw-editsection-bracket">]</span></span></h2> +<ul> +<li>A</li> +<li>B <small>C</small></li> +<li><small>D</small></li> +</ul> +<h2><small><span class="mw-headline" id="Next_Heading">Next Heading</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Next Heading">edit</a><span class="mw-editsection-bracket">]</span></span></small></h2> +<p>x</p> +!! html/parsoid +<h2>Leaky LI</h2> +<li>A</li> +<li>B <small> C</small></li> +<li><small>D +<h2>Next Heading</h2> +<p>x</p> +</small></li> +!! end + +!! test +Leaky <h2> +!! options +parsoid=wt2html +!! wikitext +<h2>bla<h2>blub +text +!! html+tidy +<h2><span class="mw-headline" id="bla.3Ch2.3Eblub.0Atext">bla<h2>blub text</span></h2> +!! html/parsoid +<h2>bla</h2> +<h2>blub +<p>text</p> +</h2> +!! end + + + # ----------------------------------------------------------------- # The following section of tests are primarily to spec requirements # around serialization of new/edited content. -- To view, visit https://gerrit.wikimedia.org/r/165749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61ba760474ed622d816edcd875046ba395e3927c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Cscott <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
