aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-06-30 21:50:38 -0400
committerAndrew Manning <tamanning@zoho.com>2016-06-30 21:50:38 -0400
commit7124c0aee5486aab74272c81ceb3e383b2e3a7f7 (patch)
treed556c7638dbfbc1deef6a2ff10c2105fa2c18dd7 /include
parent81da9f99e4ee111623a1ba302a6ab18e369756e9 (diff)
downloadvolse-hubzilla-7124c0aee5486aab74272c81ceb3e383b2e3a7f7.tar.gz
volse-hubzilla-7124c0aee5486aab74272c81ceb3e383b2e3a7f7.tar.bz2
volse-hubzilla-7124c0aee5486aab74272c81ceb3e383b2e3a7f7.zip
Replace homemade table of content generator with existing jQuery plugin. Now toc is linked to document headings.
Diffstat (limited to 'include')
-rw-r--r--include/wiki.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/wiki.php b/include/wiki.php
index 67757b0f5..424b2d9a0 100644
--- a/include/wiki.php
+++ b/include/wiki.php
@@ -498,7 +498,8 @@ function wiki_convert_links($s, $wikiURL) {
function wiki_generate_toc($s) {
if (strpos($s,'[toc]') !== false) {
- $toc_md = wiki_toc($s);
+ //$toc_md = wiki_toc($s); // Generate Markdown-formatted list prior to HTML render
+ $toc_md = '<ul id="wiki-toc"></ul>'; // use the available jQuery plugin http://ndabas.github.io/toc/
$s = preg_replace("/\[toc\]/", $toc_md, $s, -1);
}
return $s;