mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-17 11:28:41 +01:00
Move HTML Tidy 'bare' option to the config
This commit is contained in:
parent
0a3bca7dd8
commit
63b0b92690
@ -676,11 +676,16 @@
|
|||||||
// "/```([a-z0-9-]{0,20})\n(.*?)\n?```\n?/s"
|
// "/```([a-z0-9-]{0,20})\n(.*?)\n?```\n?/s"
|
||||||
$config['markup_code'] = false;
|
$config['markup_code'] = false;
|
||||||
|
|
||||||
// Repair markup with HTML Tidy. This may be slower, but it solves nesting mistakes. Tinyboad, at the
|
// Repair markup with HTML Tidy. This may be slower, but it solves nesting mistakes. Tinyboard, at the
|
||||||
// time of writing this, can not prevent out-of-order markup tags (eg. "**''test**'') without help from
|
// time of writing this, can not prevent out-of-order markup tags (eg. "**''test**'') without help from
|
||||||
// HTML Tidy.
|
// HTML Tidy.
|
||||||
$config['markup_repair_tidy'] = false;
|
$config['markup_repair_tidy'] = false;
|
||||||
|
|
||||||
|
// Use 'bare' config option of tidy::repairString.
|
||||||
|
// This option replaces some punctuation marks with their ASCII counterparts.
|
||||||
|
// Dashes are replaced with (single) hyphens, for example.
|
||||||
|
$config['markup_repair_tidy_bare'] = true;
|
||||||
|
|
||||||
// Always regenerate markup. This isn't recommended and should only be used for debugging; by default,
|
// Always regenerate markup. This isn't recommended and should only be used for debugging; by default,
|
||||||
// Tinyboard only parses post markup when it needs to, and keeps post-markup HTML in the database. This
|
// Tinyboard only parses post markup when it needs to, and keeps post-markup HTML in the database. This
|
||||||
// will significantly impact performance when enabled.
|
// will significantly impact performance when enabled.
|
||||||
|
@ -2174,7 +2174,7 @@ function markup(&$body, $track_cites = false, $op = false) {
|
|||||||
$body = str_replace("\t", '	', $body);
|
$body = str_replace("\t", '	', $body);
|
||||||
$body = $tidy->repairString($body, array(
|
$body = $tidy->repairString($body, array(
|
||||||
'doctype' => 'omit',
|
'doctype' => 'omit',
|
||||||
'bare' => true,
|
'bare' => $config['markup_repair_tidy_bare'],
|
||||||
'literal-attributes' => true,
|
'literal-attributes' => true,
|
||||||
'indent' => false,
|
'indent' => false,
|
||||||
'show-body-only' => true,
|
'show-body-only' => true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user