Parsoid
A bidirectional parser between wikitext and HTML5
|
Known failures are originating from core parser tests that eventually parsoid will be able to pass. It serves as a place to keep track of regressions even though we couldn't have 100% acceptance.
The known failures list has a few uses.
Some notes about known failures:
wt2html
test, then most likely this is a test that was never updated for parsoid. Sometime these can be fixed by just adding an !! html/parsoid
but there are lots of them, and for each one you should look at the HTML carefully to ensure that the parsoid output really does match the old PHP output, modulo "known differences" (extra span tags, etc). Known failures in wt2html
tests will usually cascade and cause failures in all other modes for this test as well.html2wt
or wt2wt
is usually some construct which does not round-trip cleanly. We used to consider this a bug in all cases. We thought that data-parsoid should always record sufficient information to exactly reconstitute the original wikitext, nonsemantic whitespace and all, but eventually it became clear that was a design mistake. Parsoid in selective serialization mode must always round-trip cleanly, but what editors actually want out of html2wt
on new/edited wikitext is "pretty" wikitext. So if the test input is pretty then wt2wt
and html2wt
should always pass. But there are lots of cases where the input isn't as "pretty" as our output. The correct fix for this is to split the test in two: write a wt2html-only
test which ensures that the "ugly" wikitext generates the correct html, and then write a "all modes" test which has the equivalent "pretty" wikitext and the exact same HTML as the ugly test. But again, there are lots of these tests to update. We may eventually want to make it easier to split these tests by adding a !! wikitext-pretty
or !! wikitext-out
section.cat
, ill
, showtitle
, property
, extension
and showindicators
options to parser tests are examples here. We'll probably support more of these eventually, the others will probably have to be rewritten as some other type of test once the legacy parser goes away.wt2html
tests, which are mostly "unported legacy tests".