手册:$wgTidyConfig
Appearance
From mediawiki.org
This page is a translated version of the page Manual:$wgTidyConfig and the translation is 52% complete.
Languages:
| Tidy: $wgTidyConfig | |
|---|---|
| Configuration of the HTML postprocessing tool to use for fixing invalid HTML code. |
|
| 引进版本: | 1.26.0(Gerrit change 235401; git #2c6c954e) |
| 移除版本: | 仍在使用 |
| 允许的值: | (数组)或null |
| 默认值: | [] (1.36+)
null (1.26-1.30) |
| 其他设置: 按首字母排序 | 按功能排序 | |
详情
HTML后处理工具的配置。 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/。
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 - Shell out to an external binary (tidyBin)
- Html5Depurate - 使用外部净化服务 (在版本1.32移除) Gerrit change 431531
- Html5Internal - 使用PHP中的Balancer库 (在版本1.32移除) Gerrit change 431531
- RemexHtml - 使用PHP中的RemexHtml库
- 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;