Also generate table of contents when loading the page

This commit is contained in:
Andrew Manning 2016-06-26 15:27:55 -04:00
parent b96edd8b9a
commit 216f034b6d

View File

@ -126,6 +126,7 @@ class Wiki extends \Zotlabs\Web\Controller {
$content = ($p['content'] !== '' ? $p['content'] : '"# New page\n"');
// Render the Markdown-formatted page content in HTML
require_once('library/markdown.php');
$content = wiki_generate_toc($content);
$renderedContent = wiki_convert_links(Markdown(json_decode($content)),argv(0).'/'.argv(1).'/'.$wikiUrlName);
$hide_editor = false;
$showPageControls = $wiki_editor;