Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

markdown-toc

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-toc - npm Package Compare versions

Comparing version 0.12.3 to 0.12.4

8

index.js

@@ -137,2 +137,6 @@ 'use strict';

}
if (ele.lvl > opts.maxdepth) {
continue;
}

@@ -142,5 +146,3 @@ var lvl = ele.lvl - opts.highest;

if (ele.lvl === opts.maxdepth) {
break;
}
}

@@ -147,0 +149,0 @@ return res.join('\n');

{
"name": "markdown-toc",
"description": "Generate a markdown TOC (table of contents) with Remarkable.",
"version": "0.12.3",
"version": "0.12.4",
"homepage": "https://github.com/jonschlinkert/markdown-toc",

@@ -30,15 +30,15 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"gray-matter": "^2.0.2",
"lazy-cache": "^1.0.2",
"list-item": "^1.0.1",
"lazy-cache": "^1.0.3",
"list-item": "^1.1.1",
"markdown-link": "^0.1.1",
"minimist": "^1.2.0",
"mixin-deep": "^1.1.3",
"object.pick": "^1.1.1",
"remarkable": "^1.6.1",
"repeat-string": "^1.5.2"
"object.pick": "^1.1.2",
"remarkable": "^1.6.2",
"repeat-string": "^1.5.4"
},
"devDependencies": {
"gulp-format-md": "^0.1.4",
"mocha": "*",
"should": "*"
"gulp-format-md": "^0.1.7",
"mocha": "^2.4.5",
"should": "^8.2.2"
},

@@ -71,2 +71,11 @@ "keywords": [

"verb": {
"run": true,
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"related": {

@@ -85,5 +94,5 @@ "list": [

],
"plugins": [
"gulp-format-md"
]
"lint": {
"reflinks": true
}
},

@@ -90,0 +99,0 @@ "directories": {

@@ -5,23 +5,10 @@ # markdown-toc [![NPM version](https://img.shields.io/npm/v/markdown-toc.svg)](https://www.npmjs.com/package/markdown-toc) [![Build Status](https://img.shields.io/travis/jonschlinkert/markdown-toc.svg)](https://travis-ci.org/jonschlinkert/markdown-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.slugify](#optionsslugify)
* [options.bullets](#optionsbullets)
* [options.maxdepth](#optionsmaxdepth)
* [options.firsth1](#optionsfirsth1)
- [Related projects](#related-projects)
- [Running tests](#running-tests)
- [Contributing](#contributing)
- [Author](#author)
- [License](#license)
## Install
_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install markdown-toc --save
```
**Features**

@@ -41,10 +28,2 @@

## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm i markdown-toc --save
```
## Usage

@@ -84,3 +63,3 @@

Insert a table of contents immediately after an _opening_ `<!-- toc -->` code comment, or replace an existing TOC if both an _opening_ comment and a _closing_ comment (`<!-- tocstop -->`) are found.
Insert a table of contents immediately after an _opening_ `<!!-- toc -->` code comment, or replace an existing TOC if both an _opening_ comment and a _closing_ comment (`<!!-- tocstop -->`) are found.

@@ -92,7 +71,7 @@ _(This strategy works well since code comments in markdown are hidden when viewed as HTML, like when viewing a README on GitHub README for example)._

```markdown
<!-- toc -->
<!!-- toc -->
- old toc 1
- old toc 2
- old toc 3
<!-- tocstop -->
<!!-- tocstop -->

@@ -109,6 +88,6 @@ ## abc

```markdown
<!-- toc -->
<!!-- toc -->
- [abc](#abc)
- [xyz](#xyz)
<!-- tocstop -->
<!!-- tocstop -->

@@ -231,2 +210,20 @@ ## abc

## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/markdown-toc/issues/new).
## Building docs
Generate readme and API documentation with [verb](https://github.com/verbose/verb):
```sh
$ npm install verb && npm run docs
```
Or, if [verb](https://github.com/verbose/verb) is installed globally:
```sh
$ verb
```
## Running tests

@@ -237,9 +234,5 @@

```sh
$ npm i -d && npm test
$ npm install -d && npm test
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/markdown-toc/issues/new).
## Author

@@ -254,7 +247,7 @@

Copyright © 2014-2016 [Jon Schlinkert](https://github.com/jonschlinkert)
Released under the MIT license.
Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert)
Released under the [MIT license](https://github.com/jonschlinkert/markdown-toc/blob/master/LICENSE).
***
_This file was generated by [verb](https://github.com/verbose/verb) on January 03, 2016._
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on March 22, 2016._
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc