Manual:$wgTidyConfig

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgTidyConfig and the translation is 28% complete.

Outdated translations are marked like this.
Other languages:
English • ‎dansk • ‎español • ‎polski • ‎português do Brasil • ‎中文 • ‎日本語
Tidy: $wgTidyConfig
Configuración de la herramienta de posprocesamiento de HTML que se utilizará para corregir código HTML no válido.
Introducido en la versión:1.26.0
Eliminado en la versión:aún se usa
Valores permitidos:matriz
Valor predeterminado:[ 'driver' => 'RemexHtml' ] (1.31-)
null (1.26-1.30)
Otros configuración: Alfabéticamente | Por Función

Detalles

Configuración de la herramienta de posprocesamiento de HTML. Defina esta opción como una matriz de configuración para activar una herramienta externa. Por lo general, se utiliza «HTML Tidy», de Dave Raggett. Consulte http://www.w3.org/People/Raggett/tidy/

The replacement for Tidy is going to be RemexHtml

If this is null and $wgUseTidy is true, the deprecated configuration parameters will be used instead. If this is null and $wgUseTidy is false, a pure PHP fallback will be used.

Keys are:

  • driver: May be:
    • RaggettInternalHHVM: Use the limited-functionality HHVM extension
    • RaggettInternalPHP: Use the PECL extension
    • RaggettExternal: Shell out to an external binary (tidyBin)
    • Html5Depurate: Use external Depurate service
    • Html5Internal: Use the Balancer library in PHP
    • RemexHtml: Use the RemexHtml library in PHP
  • tidyConfigFile: Path to configuration file for any of the Raggett drivers
  • debugComment: True to add a comment to the output with warning messages
  • tidyBin: For RaggettExternal, the path to the tidy binary.
  • tidyCommandLine: For RaggettExternal, additional command line options.

Example

Configure MediaWiki to use the tidy PECL package:

$wgTidyConfig = [
    'driver' => 'RaggettInternalPHP',
    'tidyConfigFile' => "$IP/includes/tidy/tidy.conf",
];

or to use the tidy binary:

$wgTidyConfig = [
    'driver' => 'RaggettExternal',
    'tidyConfigFile' => "$IP/includes/tidy/tidy.conf",
    'tidyBin' => 'tidy',
    'tidyCommandLine' => '',
];

The connection between $wgTidyConfig and the settings used by older MediaWiki versions ($wgTidyInternal , $wgUseTidy , $wgTidyBin , $wgTidyConf , $wgTidyOpts , $wgDebugTidy ) is roughly:

$wgTidyConfig = $wgUseTidy ? [
    'driver' => $wgTidyInternal ? 'RaggettInternalPHP' : 'RaggettExternal',
    'tidyConfigFile' => $wgTidyConf,
    'debugComment' => $wgDebugTidy,
    'tidyBin' => $wgTidyBin,
    'tidyCommandLine' => $wgTidyOpts,
] : null;