Author(s) | Enterprisey |
---|---|
Status | Stable |
Updated | October 29, 2020 |
Browsers | Firefox |
Skins | Vector |
Source | User:Enterprisey/parsoid-round-trip.js |
Uses Parsoid to convert some wikitext to HTML, and then to convert that HTML back to wikitext. Shows the result, and its difference from the original wikitext. Go to Special:BlankPage/Parsoid round trip once you've installed it.
Installation instructions
editHint: It's much easier if you get ScriptInstaller, then navigate to User:Enterprisey/parsoid-round-trip.js and click "Install" at the top.
However, here's the manual method:
- Place
{{subst:iusc|User:Enterprisey/parsoid-round-trip.js}}
on Special:MyPage/common.js or a skin-specific page, like Special:MyPage/vector.js. - Clear your cache and enjoy!
Usage
editGo to Special:BlankPage/Parsoid round trip, put some wikitext in the box, and click the button.
Roundtripping caveat
editIn production (on the real website), edited HTML is converted to wikitext using an algorithm called selective serialization. Parsoid uses it to eliminate the vast majority of dirty diffs. However, the round-tripping from this script does not use the selective serialization mode (and if used, Parsoid would simply return the original wikitext, since there are no HTML edits). As such, you will likely see a lot of dirty diffs from this script, which is not representative of what happens in production usage.