We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1b4ee2 commit 740644aCopy full SHA for 740644a
src/helpers/matches.js
@@ -0,0 +1,3 @@
1
+'use strict'
2
+
3
+module.exports = (subject, pattern) => new RegExp(pattern).test(subject)
src/partials/toc.hbs
@@ -1,3 +1,5 @@
+{{#if (matches page.contents ' class="sect[01]"')}}
<aside class="toc sidebar" data-title="{{or page.attributes.toctitle 'Contents'}}" data-levels="{{{or page.attributes.toclevels 2}}}">
<div class="toc-menu"></div>
4
</aside>
5
+{{/if}}
0 commit comments