Skip to content

Commit

Permalink
Corrected maxlevel option parsing in toc syntax tag. Fixes #198.
Browse files Browse the repository at this point in the history
  • Loading branch information
lpaulsen93 committed Apr 5, 2017
1 parent 39b6e85 commit 98e664c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion renderer/page.php
Expand Up @@ -435,7 +435,7 @@ protected function get_index_settings($type, $settings) {
// outline level than 1.
$data ['maxlevel'] = $this->config->getParam('toc_maxlevel');
if ( preg_match('/maxlevel=[^;]+;/', $settings, $matches) === 1 ) {
$temp = substr ($matches [0], 12);
$temp = substr ($matches [0], 9);
$temp = trim ($temp, ';');
$data ['maxlevel'] = $temp;
}
Expand Down

0 comments on commit 98e664c

Please sign in to comment.