|
MediaWiki master
|
Parser implementation which uses Parsoid. More...
Public Member Functions | |
| __construct (private Parsoid $parsoid, private readonly PageConfigFactory $pageConfigFactory, private readonly LanguageConverterFactory $languageConverterFactory, private readonly DataAccess $dataAccess,) | |
| 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" |
Parser implementation which uses Parsoid.
Currently incomplete; see T236809 for the long-term plan.
Definition at line 35 of file ParsoidParser.php.
| MediaWiki\Parser\Parsoid\ParsoidParser::__construct | ( | private Parsoid | $parsoid, |
| private readonly PageConfigFactory | $pageConfigFactory, | ||
| private readonly LanguageConverterFactory | $languageConverterFactory, | ||
| private readonly DataAccess | $dataAccess ) |
Definition at line 44 of file ParsoidParser.php.
| 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 240 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 301 of file ParsoidParser.php.
| const MediaWiki\Parser\Parsoid\ParsoidParser::PARSOID_TITLE_KEY = "parsoid:title-dbkey" |
Definition at line 42 of file ParsoidParser.php.