File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 11# remark-toc [ ![ Build Status] [ build-badge ]] [ build-status ] [ ![ Coverage Status] [ coverage-badge ]] [ coverage-status ] [ ![ Chat] [ chat-badge ]] [ chat ]
22
3- <!-- lint disable list-item-spacing heading-increment-->
4-
53Generate a Table of Contents in [ ** remark** ] [ remark ] .
64
75## Installation
@@ -12,21 +10,12 @@ Generate a Table of Contents in [**remark**][remark].
1210npm install remark-toc
1311```
1412
15- ** remark-toc** is also available as an AMD, CommonJS, and globals
16- module, [ uncompressed and compressed] [ releases ] .
17-
1813## Usage
1914
20- Dependencies:
21-
2215``` javascript
2316var remark = require (' remark' );
2417var toc = require (' remark-toc' );
25- ```
2618
27- Process:
28-
29- ``` javascript
3019var file = remark ().use (toc).process ([
3120 ' # Alpha' ,
3221 ' ' ,
@@ -39,6 +28,8 @@ var file = remark().use(toc).process([
3928 ' ## Delta' ,
4029 ' '
4130].join (' \n ' ));
31+
32+ console .log (String (file));
4233```
4334
4435Yields:
@@ -103,8 +94,6 @@ Add a Table of Contents to a Markdown document.
10394
10495[ chat ] : https://gitter.im/wooorm/remark
10596
106- [ releases ] : https://github.com/wooorm/remark-toc/releases
107-
10897[ license ] : LICENSE
10998
11099[ author ] : http://wooorm.com
You can’t perform that action at this time.
0 commit comments