Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Logger\LintLogger Class Reference

Logger backend for linter. More...

Public Member Functions

 __construct (Env $env)
 
 logLintOutput ()
 

Static Public Member Functions

static convertDSROffsets (Env $env, array &$lints, string $from='byte', string $to='ucs2')
 Convert DSR offsets in collected lints.
 

Detailed Description

Logger backend for linter.

This backend filters out logging messages with Logtype "lint/*" and logs them (console, external service).

Member Function Documentation

◆ convertDSROffsets()

static Wikimedia\Parsoid\Logger\LintLogger::convertDSROffsets ( Env $env,
array & $lints,
string $from = 'byte',
string $to = 'ucs2' )
static

Convert DSR offsets in collected lints.

Linter offsets should always be ucs2 if the lint viewer is client-side JavaScript. But, added conversion args in case callers wants some other conversion for other use cases.

Parameters
Env$env
array&$lints
('byte'|'ucs2'|'char')$from
('byte'|'ucs2'|'char')$to

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