diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-29 15:56:36 +1000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-29 15:56:36 +1000 |
| commit | 7b817eea1119a9bd243497d68ba27059533ba5d8 (patch) | |
| tree | ae9a1a224127ae36aa251262d131122e1716188c /inc/config.php | |
| parent | 3b63cad71fe15f98dc84f3d6451817251e8f89f7 (diff) | |
Fix markup again. And add the option to repair fucked up nesting (and more) with HTML Tidy ($config['markup_repair_tidy'])
Diffstat (limited to 'inc/config.php')
| -rw-r--r-- | inc/config.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/inc/config.php b/inc/config.php index 9f68d04b..f9dc9912 100644 --- a/inc/config.php +++ b/inc/config.php @@ -459,10 +459,10 @@ */ // "Wiki" markup syntax ($config['wiki_markup'] in pervious versions): - $config['markup'][] = array("/'''([^<]+?)'''/", "<strong>\$1</strong>"); - $config['markup'][] = array("/''([^<]+?)''/", "<em>\$1</em>"); - $config['markup'][] = array("/\*\*([^<]+?)\*\*/", "<span class=\"spoiler\">\$1</span>"); - // $config['markup'][] = array("/^[ |\t]*==([^<]+?)==[ |\t]*$/m", "<span class=\"heading\">\$1</span>"); + $config['markup'][] = array("/'''(.+?)'''/", "<strong>\$1</strong>"); + $config['markup'][] = array("/''(.+?)''/", "<em>\$1</em>"); + $config['markup'][] = array("/\*\*(.+?)\*\*/", "<span class=\"spoiler\">\$1</span>"); + // $config['markup'][] = array("/^[ |\t]*==(.+?)==[ |\t]*$/m", "<span class=\"heading\">\$1</span>"); // Highlight PHP code wrapped in <code> tags (PHP 5.3+) // $config['markup'][] = array( @@ -472,6 +472,10 @@ // } // ); + // Repair markup with HTML Tidy. This may be slower, but most if the time it solves nesting mistakes. + // Tinyboad, at the time of writing this, can not prevent out-of-order markup tags (eg. "**''test**''). + $config['markup_repair_tidy'] = false; + // 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 // will significantly impact performance when enabled. |
