mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-12-18 17:22:43 +00:00
0eef7add67
* Added Parsoid config, and refactored code slightly to add native Parsoid handlers for parser tags exposed by this extension. * Enabled parsoid mode testing on the test file. * Added html/parsoid sections on a few tests. * Marked rest of tests as wt2html and wt2wt only since html2wt and html2html will fail without a html/parsoid section and there is no real benefit to adding them to all tests. * Added a couple tests to the known failures list: - One is because of T299103. - The other is because Parsoid always emits attributes in the form <tag .. foo="bar"..> instead of just <tag ... foo ..> Since Parsoid needs to accept this format that is present on wikis, I added a html/parsoid section for this test and added the failures to the known failures list. Bug: T272939 Change-Id: Ie30aa6b082d4fc43c73296ff2ed6cb8c3873f48f
27 lines
2.8 KiB
JSON
27 lines
2.8 KiB
JSON
{
|
|
"Enclose with nowiki": {
|
|
"wt2html": "<p data-parsoid='{\"dsr\":[0,69,0,0]}'><code class=\"mw-highlight mw-highlight-lang-text mw-content-ltr\" dir=\"ltr\" typeof=\"mw:Extension/syntaxhighlight mw:Transclusion\" about=\"#mwt2\" data-parsoid='{\"pi\":[[{\"k\":\"1\"},{\"k\":\"lang\",\"named\":true},{\"k\":\"inline\",\"named\":true}]],\"dsr\":[0,69,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#tag:syntaxhighlight\",\"function\":\"tag\"},\"params\":{\"1\":{\"wt\":\"<nowiki>foo</nowiki>\"},\"lang\":{\"wt\":\"\\\"text\\\"\"},\"inline\":{\"wt\":\"none\"}},\"i\":0}}]}'><nowiki>foo</nowiki></code></p>",
|
|
"html2html": "<p data-parsoid='{\"dsr\":[0,69,0,0]}'><code class=\"mw-highlight mw-highlight-lang-text mw-content-ltr\" dir=\"ltr\" typeof=\"mw:Extension/syntaxhighlight mw:Transclusion\" about=\"#mwt2\" data-parsoid='{\"pi\":[[{\"k\":\"1\"},{\"k\":\"lang\",\"named\":true},{\"k\":\"inline\",\"named\":true}]],\"dsr\":[0,69,null,null]}' data-mw='{\"parts\":[{\"template\":{\"target\":{\"wt\":\"#tag:syntaxhighlight\",\"function\":\"tag\"},\"params\":{\"1\":{\"wt\":\"<nowiki>foo</nowiki>\"},\"lang\":{\"wt\":\"\\\"text\\\"\"},\"inline\":{\"wt\":\"none\"}},\"i\":0}}]}'><nowiki>foo</nowiki></code></p>"
|
|
},
|
|
"Inline attribute (inline code)": {
|
|
"wt2wt": "Text <source lang=\"javascript\" inline=\"\">var a;</source>.",
|
|
"selser [1]": "Text <source lang=\"javascript\" inline>var a;</source>.",
|
|
"selser [[4,0,4]]": "121y1t4<source lang=\"javascript\" inline>var a;</source>1ibg90y",
|
|
"selser [[0,0,2]]": "Text <source lang=\"javascript\" inline>var a;</source>yeuqlm.",
|
|
"selser [2]": "brhsc5\n\nText <source lang=\"javascript\" inline>var a;</source>.",
|
|
"selser [[0,0,4]]": "Text <source lang=\"javascript\" inline>var a;</source>4x62b6",
|
|
"selser [[2,0,0]]": "1mjitw8Text <source lang=\"javascript\" inline>var a;</source>.",
|
|
"selser [[0,0,3]]": "Text <source lang=\"javascript\" inline>var a;</source>",
|
|
"selser [[2,0,4]]": "uuwnfvText <source lang=\"javascript\" inline>var a;</source>qjkvx1",
|
|
"selser [[3,0,3]]": "<source lang=\"javascript\" inline>var a;</source>",
|
|
"selser [[4,0,0]]": "uouej0<source lang=\"javascript\" inline>var a;</source>.",
|
|
"selser [[3,0,0]]": "<source lang=\"javascript\" inline>var a;</source>.",
|
|
"selser [[4,0,3]]": "1wcoh54<source lang=\"javascript\" inline>var a;</source>",
|
|
"selser [[2,0,2]]": "11th7ozText <source lang=\"javascript\" inline>var a;</source>1c8ff9m.",
|
|
"selser [[2,0,3]]": "1cyv6rText <source lang=\"javascript\" inline>var a;</source>",
|
|
"selser [[4,0,2]]": "g6ytvp<source lang=\"javascript\" inline>var a;</source>10gwvyi.",
|
|
"selser [[3,0,2]]": "<source lang=\"javascript\" inline>var a;</source>kjtjv6.",
|
|
"selser [[3,0,4]]": "<source lang=\"javascript\" inline>var a;</source>zs6oqy"
|
|
}
|
|
}
|