Parsoid
A bidirectional parser between wikitext and HTML5
|
This class represents core wikitext concepts that are currently represented as methods of Parser.php (in core) OR Parsoid.php (here) or other classes. More...
Static Public Member Functions | |
static | preprocess (Env $env, string $wt) |
Equivalent of 'preprocessWikitext' from Parser.php in core. | |
This class represents core wikitext concepts that are currently represented as methods of Parser.php (in core) OR Parsoid.php (here) or other classes.
Care should be taken to have this class represent first-class wikitext concepts and operations and not so much implementation concepts, but that is understandably a hard line to draw. Given that, this suggestion is more of a guideline to help with code hygiene.
|
static |
Equivalent of 'preprocessWikitext' from Parser.php in core.
Notably, this doesn't support replacing template args from a frame, i.e. the preprocessing here is of standalone wikitext, not in reference to something else which is where a frame would be used.
This does not run any Parser hooks either, but support for which could eventually be added that is triggered by input options.
This also updates resource usage and returns an error if limits are breached.
Env | $env | |
string | $wt |