Socket
Socket
Sign inDemoInstall

doctoc

Package Overview
Dependencies
6
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.1.0

4

lib/transform.js

@@ -12,3 +12,5 @@ 'use strict';

, end = '<!-- END doctoc generated TOC please keep comment here to allow auto update -->'
, skipTag = '<!-- DOCTOC SKIP -->';
function matchesStart(line) {

@@ -111,2 +113,4 @@ return (/<!-- START doctoc /).test(line);

exports = module.exports = function transform(content, mode, maxHeaderLevel, title, notitle, entryPrefix, processAll, updateOnly) {
if (content.indexOf(skipTag) !== -1) return { transformed: false };
mode = mode || 'github.com';

@@ -113,0 +117,0 @@ entryPrefix = entryPrefix || '-';

2

package.json

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

"description": "Generates TOC for markdown files of local git repo.",
"version": "2.0.1",
"version": "2.1.0",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

# DocToc [![build status](https://secure.travis-ci.org/thlorenz/doctoc.svg)](http://travis-ci.org/thlorenz/doctoc)
<a href="https://www.patreon.com/bePatron?u=8663953"><img alt="become a patron" src="https://c5.patreon.com/external/logo/become_a_patron_button.png" height="35px"></a>
Generates table of contents for markdown files inside local git repository. Links are compatible with anchors generated

@@ -52,2 +50,4 @@ by github or other sites via a command line flag.

### Ignoring individual files
In order to ignore a specific file when running `doctoc` on an entire directory, just add `<!-- DOCTOC SKIP -->` to the top of the file you wish to ignore.

@@ -70,10 +70,2 @@ ### Update existing doctoc TOCs effortlessly

You can use this feature to do more sophisticated things. For example, if you
have [ack][ack] installed, you could add `<!-- DOCTOC SKIP -->` to specific
files and then use
ack -L 'DOCTOC SKIP' | xargs doctoc
to recompile only those files which don't have the DOCTOC SKIP comment.
### Using doctoc to generate links compatible with other sites

@@ -80,0 +72,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc