|
MediaWiki 1.43.1
|
Parser implementation which uses Parsoid. More...
Public Member Functions | |
| __construct (Parsoid $parsoid, PageConfigFactory $pageConfigFactory, LanguageConverterFactory $languageConverterFactory, ParserFactory $legacyParserFactory) | |
| parse ( $text, PageReference $page, ParserOptions $options, bool $linestart=true, bool $clearState=true, ?int $revId=null, ?ParserOutput $previousOutput=null) | |
| Convert wikitext to HTML Do not call this function recursively. | |
| parseFakeRevision (RevisionRecord $fakeRev, PageReference $page, ParserOptions $options) | |
Public Attributes | |
| const | PARSOID_TITLE_KEY = "parsoid:title-dbkey" |
Protected Member Functions | |
| makeLimitReport (ParserOptions $parserOptions, ParserOutput $parserOutput) | |
| Set the limit report data in the current ParserOutput. | |
Parser implementation which uses Parsoid.
Currently incomplete; see T236809 for the long-term plan.
Definition at line 32 of file ParsoidParser.php.
| MediaWiki\Parser\Parsoid\ParsoidParser::__construct | ( | Parsoid | $parsoid, |
| PageConfigFactory | $pageConfigFactory, | ||
| LanguageConverterFactory | $languageConverterFactory, | ||
| ParserFactory | $legacyParserFactory ) |
| Parsoid | $parsoid | |
| PageConfigFactory | $pageConfigFactory | |
| LanguageConverterFactory | $languageConverterFactory | |
| ParserFactory | $legacyParserFactory |
Definition at line 51 of file ParsoidParser.php.
|
protected |
Set the limit report data in the current ParserOutput.
This is ported from Parser::makeLimitReport() and should eventually use the method from the superclass directly.
Definition at line 327 of file ParsoidParser.php.
References MediaWiki\Parser\CacheTime\getCacheExpiry(), MediaWiki\Parser\CacheTime\getCacheTime(), MediaWiki\Parser\ParserOptions\getMaxIncludeSize(), MediaWiki\Parser\ParserOutput\getTimeProfile(), MediaWiki\Parser\ParserOutput\hasReducedExpiry(), and MediaWiki\Parser\ParserOutput\setLimitReportData().
| MediaWiki\Parser\Parsoid\ParsoidParser::parse | ( | $text, | |
| PageReference | $page, | ||
| ParserOptions | $options, | ||
| bool | $linestart = true, | ||
| bool | $clearState = true, | ||
| ?int | $revId = null, | ||
| ?ParserOutput | $previousOutput = null ) |
Convert wikitext to HTML Do not call this function recursively.
| string | TextContent | $text | Text we want to parse |
| PageReference | $page | |
| ParserOptions | $options | |
| bool | $linestart | |
| bool | $clearState | |
| int | null | $revId | ID of the revision being rendered. This is used to render REVISION* magic words. 0 means that any current revision will be used. Null means that {{REVISIONID}}/{{REVISIONUSER}} will be empty and {{REVISIONTIMESTAMP}} will use the current timestamp. |
| ?ParserOutput | $previousOutput | The (optional) result of a previous parse of this page, which can be used for selective update. |
Definition at line 239 of file ParsoidParser.php.
| MediaWiki\Parser\Parsoid\ParsoidParser::parseFakeRevision | ( | RevisionRecord | $fakeRev, |
| PageReference | $page, | ||
| ParserOptions | $options ) |
Convert custom wikitext (stored in main slot of the $fakeRev arg) to HTML. Callers are expected NOT to stuff the result into ParserCache.
| RevisionRecord | $fakeRev | Revision to parse |
| PageReference | $page | |
| ParserOptions | $options |
Definition at line 302 of file ParsoidParser.php.
| const MediaWiki\Parser\Parsoid\ParsoidParser::PARSOID_TITLE_KEY = "parsoid:title-dbkey" |
Definition at line 39 of file ParsoidParser.php.