MediaWiki master
MediaWiki\Parser\Parsoid\LintErrorChecker Class Reference

Check arbitrary wikitext for lint errors. More...

Public Member Functions

 __construct (Parsoid $parsoid, PageConfigFactory $pageConfigFactory, TitleFactory $titleFactory, ExtensionRegistry $extensionRegistry, Config $mainConfig)
 
 check (string $wikitext)
 Check the given wikitext for lint errors.
 
 checkSome (string $wikitext, array $disabled)
 Check the given wikitext for lint errors against a subset of lint categories.
 

Detailed Description

Check arbitrary wikitext for lint errors.

Since
1.43

Definition at line 20 of file LintErrorChecker.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Parser\Parsoid\LintErrorChecker::__construct ( Parsoid $parsoid,
PageConfigFactory $pageConfigFactory,
TitleFactory $titleFactory,
ExtensionRegistry $extensionRegistry,
Config $mainConfig )

Definition at line 27 of file LintErrorChecker.php.

Member Function Documentation

◆ check()

MediaWiki\Parser\Parsoid\LintErrorChecker::check ( string $wikitext)

Check the given wikitext for lint errors.

While not strictly required, you'll get better results if the wikitext has already gone through PST

Parameters
string$wikitextWikitext after PST
Returns
array Array of error objects returned by Parsoid's lint API (empty array for no errors)

Definition at line 63 of file LintErrorChecker.php.

◆ checkSome()

MediaWiki\Parser\Parsoid\LintErrorChecker::checkSome ( string $wikitext,
array $disabled )

Check the given wikitext for lint errors against a subset of lint categories.

While not strictly required, you'll get better results if the wikitext has already gone through PST

Parameters
string$wikitextWikitext after PST
string[]$disabledArray of lint categories to disable
Returns
array Array of error objects returned by Parsoid's lint API (empty array for no errors)

Definition at line 76 of file LintErrorChecker.php.


The documentation for this class was generated from the following file: