Socket
Socket
Sign inDemoInstall

markdown-toc

Package Overview
Dependencies
38
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.11.5 to 0.11.6

8

lib/insert.js
'use strict';
var toc = require('..');
var lazy = require('lazy-cache')(require);
var matter = lazy('gray-matter');
var toc = require('..');
lazy('gray-matter', 'matter');

@@ -31,3 +31,3 @@ /**

// doesn't get mistaken for a heading
file = matter()(str);
file = lazy.matter(str);
str = file.content;

@@ -54,3 +54,3 @@ }

if (file) {
return matter().stringify(res, file.data);
return lazy.matter.stringify(res, file.data);
}

@@ -57,0 +57,0 @@ return res;

{
"name": "markdown-toc",
"description": "Generate a markdown TOC (table of contents) with Remarkable.",
"version": "0.11.5",
"version": "0.11.6",
"homepage": "https://github.com/jonschlinkert/markdown-toc",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"bin": {
"markdown-toc": "cli.js"
},
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/markdown-toc.git"
},
"repository": "jonschlinkert/markdown-toc",
"bugs": {

@@ -24,2 +18,5 @@ "url": "https://github.com/jonschlinkert/markdown-toc/issues"

"main": "index.js",
"bin": {
"markdown-toc": "cli.js"
},
"engines": {

@@ -32,8 +29,8 @@ "node": ">=0.10.0"

"dependencies": {
"concat-stream": "^1.4.8",
"extend-shallow": "^1.1.2",
"gray-matter": "^2.0.0",
"lazy-cache": "^0.1.0",
"concat-stream": "^1.5.0",
"extend-shallow": "^2.0.1",
"gray-matter": "^2.0.1",
"lazy-cache": "^0.2.3",
"markdown-link": "^0.1.1",
"minimist": "^1.1.1",
"minimist": "^1.2.0",
"object.pick": "^1.1.1",

@@ -56,2 +53,4 @@ "remarkable": "^1.6.0",

"md",
"glossary",
"index",
"links",

@@ -65,2 +64,3 @@ "reference",

"renderer",
"table-of-contents",
"table of contents",

@@ -73,3 +73,17 @@ "table",

"test": "test"
},
"verb": {
"related": {
"list": [
"remarkable",
"markdown-utils",
"markdown-link",
"gfm-code-blocks",
"pretty-remarkable"
]
},
"reflinks": [
"verb"
]
}
}

@@ -5,2 +5,28 @@ # markdown-toc [![NPM version](https://badge.fury.io/js/markdown-toc.svg)](http://badge.fury.io/js/markdown-toc) [![Build Status](https://travis-ci.org/jonschlinkert/markdown-toc.svg)](https://travis-ci.org/jonschlinkert/markdown-toc)

<!-- toc -->
* [Install](#install)
* [Usage](#usage)
* [API](#api)
- [toc.json](#tocjson)
- [toc.insert](#tocinsert)
- [Utility functions](#utility-functions)
* [Options](#options)
- [options.append](#optionsappend)
- [options.filter](#optionsfilter)
- [options.bullets](#optionsbullets)
- [options.maxdepth](#optionsmaxdepth)
- [options.firsth1](#optionsfirsth1)
* [Related projects](#related-projects)
* [Running tests](#running-tests)
* [Contributing](#contributing)
* [Author](#author)
* [License](#license)
_(Table of contents generated by [verb](https://github.com/verbose/verb))_
<!-- tocstop -->
**Features**
* Won't mangle markdown in code examples (like headings, coffee or yaml comments in gfm fenced code blocks that other TOC generators mistake as being actual headings)

@@ -20,10 +46,2 @@ * Uses sane defaults, so no customization is necessary, but you can if you need to.

## Related projects
* [gfm-code-blocks](https://github.com/jonschlinkert/gfm-code-blocks): Extract gfm (GitHub Flavored Markdown) fenced code blocks from a string.
* [markdown-utils](https://github.com/jonschlinkert/markdown-utils): Micro-utils for creating markdown snippets.
* [markdown-link](https://github.com/jonschlinkert/markdown-link): Micro util for generating a single markdown link.
* [pretty-remarkable](https://github.com/jonschlinkert/pretty-remarkable): Plugin for prettifying markdown with Remarkable using custom renderer rules.
* [remarkable](https://github.com/jonschlinkert/remarkable): Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… [more](https://github.com/jonschlinkert/remarkable)
## Usage

@@ -171,9 +189,9 @@

### options.maxDepth
### options.maxdepth
Type: `Number`
Default: `3`
Default: `6`
Use headings whose depth is at most maxDepth.
Use headings whose depth is at most maxdepth.

@@ -188,2 +206,10 @@ ### options.firsth1

## Related projects
* [gfm-code-blocks](https://www.npmjs.com/package/gfm-code-blocks): Extract gfm (GitHub Flavored Markdown) fenced code blocks from a string. | [homepage](https://github.com/jonschlinkert/gfm-code-blocks)
* [markdown-link](https://www.npmjs.com/package/markdown-link): Micro util for generating a single markdown link. | [homepage](https://github.com/jonschlinkert/markdown-link)
* [markdown-utils](https://www.npmjs.com/package/markdown-utils): Micro-utils for creating markdown snippets. | [homepage](https://github.com/jonschlinkert/markdown-utils)
* [pretty-remarkable](https://www.npmjs.com/package/pretty-remarkable): Plugin for prettifying markdown with Remarkable using custom renderer rules. | [homepage](https://github.com/jonschlinkert/pretty-remarkable)
* [remarkable](https://www.npmjs.com/package/remarkable): Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… [more](https://www.npmjs.com/package/remarkable) | [homepage](https://github.com/jonschlinkert/remarkable)
## Running tests

@@ -199,3 +225,3 @@

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/markdown-toc/issues/new)
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/markdown-toc/issues/new).

@@ -216,2 +242,2 @@ ## Author

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 25, 2015._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 17, 2015._
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