!! options version=2 parsoid-compatible=wt2html,wt2wt !! end # Force the test runner to ensure the extension is loaded !! functionhooks translation !! endfunctionhooks !! article Template:1x !! text {{{1}}} !! endarticle !! test #translation as magic word for valid language code !! options title=[[Test/mr]] !! wikitext {{#translation:}} !! html/php

/mr

!! html/parsoid

/mr

!! end !! test #translation as magic word for source page !! options title=[[Test]] !! wikitext {{#translation:}} !! html/php !! html/parsoid !! end !! test #translation as magic word for invalid language code !! options title=[[Test/ugaaa]] !! wikitext {{#translation:}} !! html !! html/parsoid !! end !! test Old tvar syntax should not break too hard. !! options # html2wt and wt2wt are expected to break because we serialize to new syntax. # html2html breaks because the wtOffsets break. parsoid={ "modes": ["wt2html", "selser"] } !! wikitext pouet !! html/parsoid

pouet

!! end !! test Old tvar syntax should not pull content in cell attributes !! options # html2wt and wt2wt are expected to break because we serialize to new syntax. # html2html breaks because the wtOffsets break. parsoid={ "modes": ["wt2html", "selser"] } !! wikitext {| |hello variable |} !! html/parsoid
hello variable
!! end !! test Annotation markers starting lines should neither insert pre nor merge ranges !! wikitext translate 1 translate 2 !! html/parsoid

translate 1 translate 2

!! end !! test tvar in a template should get stripped !! options parsoid={ "modes": ["wt2html"] } !! wikitext {{1x|hello}} !! html/parsoid

hello

!! end !! test tvar with old syntax containing template markup should not break !! options parsoid={ "modes": ["wt2html"] } !! wikitext hello {{1x|world}} !! html/parsoid

hello world<tvar

!! end