Manual:$wgTidyConfig/ja

From Linux Web Expert

<translate> Tidy</translate>: $wgTidyConfig
Configuration of the HTML postprocessing tool to use for fixing invalid HTML code.
<translate> Introduced in version:</translate>1.26.0 (Gerrit change 235401; git #2c6c954e)
<translate> Removed in version:</translate><translate> still in use</translate>
<translate> Allowed values:</translate>(配列) または null
<translate> Default value:</translate>[] (1.36+)

[ 'driver' => 'RemexHtml' ] (1.31-1.35)

null (1.26-1.30)

詳細

Configuration for HTML postprocessing tool. Set this to a configuration array to enable an external tool. Dave Raggett's "HTML Tidy" is typically used. 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.

キーは以下の通り:

  • driver - おそらく以下の通り:
    • RaggettInternalHHVM - Use the limited-functionality HHVM extension
    • RaggettInternalPHP - PECL 拡張機能を使用
    • RaggettExternal - 外部バイナリ (tidyBin) へシェル出力
    • Html5Depurate - Use external Depurate service <translate> (removed in <tvar name=2>1.32</tvar>)</translate> Gerrit change 431531
    • Html5Internal - Use the Balancer library in PHP <translate> (removed in <tvar name=2>1.32</tvar>)</translate> Gerrit change 431531
    • 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.

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;