Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
Added: remark-toc in default markdown transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
MoOx committed Sep 17, 2016
1 parent abadadf commit 569d512
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flow/interfaces/node-modules/remark-toc.js
@@ -0,0 +1,3 @@
declare module "remark-toc" {
declare var exports: () => void
}
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -68,6 +68,7 @@
"remark-highlight.js": "^4.0.0",
"remark-html": "^5.0.0",
"remark-slug": "^4.1.0",
"remark-toc": "^3.1.0",
"rimraf": "^2.4.2",
"rss": "^1.2.0",
"semver": "^5.3.0",
Expand Down
Expand Up @@ -4,6 +4,7 @@ import remark from "remark"
import slug from "remark-slug"
import autoLinkHeadings from "remark-autolink-headings"
import highlight from "remark-highlight.js"
import toc from "remark-toc"
import html from "remark-html"

function mdify(text) {
Expand All @@ -28,6 +29,9 @@ function mdify(text) {
// https://github.com/ben-eb/remark-highlight.js
.use(highlight)

// https://github.com/wooorm/remark-toc
.use(toc)

// render
.process(text, {
commonmark: true,
Expand Down

0 comments on commit 569d512

Please sign in to comment.