Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remark-gfm plugin reorganization
  • Loading branch information
paolodenti committed Nov 23, 2020
commit c7a0bb8308739d9582fe8bcca7b392e213e8ecce
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,5 @@
"shiki": "^0.2.7",
"shiki-twoslash": "^0.8.1",
"tib": "^0.7.4"
},
"dependencies": {
"remark-gfm": "^1.0.0"
}
}
3 changes: 2 additions & 1 deletion packages/content/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const getDefaults = ({ dev = false } = {}) => ({
'remark-slug',
'remark-autolink-headings',
'remark-external-links',
'remark-footnotes'
'remark-footnotes',
'remark-gfm'
],
rehypePlugins: [
'rehype-sort-attribute-values',
Expand Down
1 change: 1 addition & 0 deletions packages/content/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"remark-autolink-headings": "^6.0.1",
"remark-external-links": "^8.0.0",
"remark-footnotes": "^3.0.0",
"remark-gfm": "^1.0.0",
"remark-parse": "^9.0.0",
"remark-rehype": "^8.0.0",
"remark-slug": "^6.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/content/parsers/markdown/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const matter = require('gray-matter')
const unified = require('unified')
const parse = require('remark-parse')
const gfm = require('remark-gfm')
const remark2rehype = require('remark-rehype')

const handlers = require('./handlers')
Expand Down Expand Up @@ -71,7 +70,7 @@ class Markdown {
}

return new Promise((resolve, reject) => {
let stream = unified().use(parse).use(gfm)
let stream = unified().use(parse)

stream = this.processPluginsFor('remark', stream)
stream = stream.use(remark2rehype, {
Expand Down