🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

gitbook-plugin-etoc

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitbook-plugin-etoc - npm Package Compare versions

Comparing version

to
1.1.10

9

index.js

@@ -23,6 +23,2 @@ var toc = require('markdown-toc');

if (_notoc && (!_existstoc)) return page;
if (!(_notoc || _existstoc)) {
// insert <!-- toc --> before the first h2 element
page.content = page.content.replace(/^##([^#])/m, eol + '<!-- toc -->' + eol + '##' + '$1');
}

@@ -38,2 +34,7 @@ var _mindepth = this.config.get('pluginsConfig.etoc.mindepth') || 3;

if (!(_notoc || _existstoc)) {
// insert <!-- toc --> before the first h2 element
page.content = page.content.replace(/^##([^#])/m, eol + '<!-- toc -->' + eol + '##' + '$1');
}
// markdown-toc do not pass options to generate,

@@ -40,0 +41,0 @@ // we should escape <!-- toc --> not beginning with whitespace

@@ -5,3 +5,3 @@ {

"main": "index.js",
"version": "1.1.9",
"version": "1.1.10",
"engines": {

@@ -8,0 +8,0 @@ "gitbook": "*"