1
0
forked from GitHub/gf-core

TOC for Markdown should now work for both Pandoc < 2.0 and >= 2.0

The use of $toc$ and $table-of-contents$ flags changed, see:
https://pandoc.org/releases.html#pandoc-2.0-29-oct-2017
under "Behaviour changes"
This commit is contained in:
John J. Camilleri
2018-12-10 14:25:44 +01:00
parent d82a53ebc6
commit 083aa96e57
3 changed files with 13 additions and 7 deletions

View File

@@ -54,7 +54,13 @@ $endif$
$endif$
$if(toc)$
<nav id="$idprefix$TOC">
$table-of-contents$
$if(table-of-contents)$
<!-- pandoc >= 2.0 -->
$table-of-contents$
$else$
<!-- pandoc < 2.0 -->
$toc$
$endif$
</nav>
$endif$
$body$