Socket
Socket
Sign inDemoInstall

mdast-util-gfm

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdast-util-gfm - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

22

package.json
{
"name": "mdast-util-gfm",
"version": "0.1.0",
"description": "mdast extension to parse and serialize GFM (gitHub Flavored Markdown)",
"version": "0.1.1",
"description": "mdast extension to parse and serialize GFM (GitHub Flavored Markdown)",
"license": "MIT",

@@ -42,3 +42,4 @@ "keywords": [

"mdast-util-gfm-table": "^0.1.0",
"mdast-util-gfm-task-list-item": "^0.1.0"
"mdast-util-gfm-task-list-item": "^0.1.0",
"mdast-util-to-markdown": "^0.6.1"
},

@@ -48,13 +49,12 @@ "devDependencies": {

"hast-util-to-html": "^7.0.0",
"mdast-util-from-markdown": "^0.5.0",
"mdast-util-to-hast": "^9.1.2",
"mdast-util-to-markdown": "^0.3.0",
"micromark-extension-gfm": "^0.1.0",
"node-fetch": "^2.6.1",
"mdast-util-from-markdown": "^0.8.0",
"mdast-util-to-hast": "^10.0.0",
"micromark-extension-gfm": "^0.3.0",
"node-fetch": "^2.0.0",
"nyc": "^15.0.0",
"prettier": "^2.0.0",
"remark-cli": "^8.0.0",
"remark-preset-wooorm": "^7.0.0",
"remark-cli": "^9.0.0",
"remark-preset-wooorm": "^8.0.0",
"tape": "^5.0.0",
"xo": "^0.33.0"
"xo": "^0.35.0"
},

@@ -61,0 +61,0 @@ "scripts": {

@@ -17,4 +17,4 @@ # mdast-util-gfm

You probably shouldn’t use this package directly, but instead use `remark-gfm`
with **[remark][]**.
You probably shouldn’t use this package directly, but instead use
[`remark-gfm`][remark-gfm] with **[remark][]**.

@@ -242,3 +242,3 @@ Alternatively, the extensions can be used separately:

— markdown processor powered by plugins
* `remarkjs/remark-gfm`
* [`remarkjs/remark-gfm`][remark-gfm]
— remark plugin to support GFM

@@ -270,5 +270,5 @@ * [`micromark/micromark`][micromark]

[build-badge]: https://img.shields.io/travis/syntax-tree/mdast-util-gfm.svg
[build-badge]: https://github.com/syntax-tree/mdast-util-gfm/workflows/main/badge.svg
[build]: https://travis-ci.org/syntax-tree/mdast-util-gfm
[build]: https://github.com/syntax-tree/mdast-util-gfm/actions

@@ -313,2 +313,4 @@ [coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-gfm.svg

[remark-gfm]: https://github.com/remarkjs/remark-gfm
[from-markdown]: https://github.com/syntax-tree/mdast-util-from-markdown

@@ -315,0 +317,0 @@

@@ -5,2 +5,3 @@ var autolinkLiteral = require('mdast-util-gfm-autolink-literal/to-markdown')

var taskListItem = require('mdast-util-gfm-task-list-item/to-markdown')
var configure = require('mdast-util-to-markdown/lib/configure')

@@ -10,22 +11,14 @@ module.exports = toMarkdown

function toMarkdown(options) {
var extensions = [
autolinkLiteral,
strikethrough,
table(options),
taskListItem
]
var length = extensions.length
var index = -1
var extension
var unsafe = []
var handlers = {}
var config = configure(
{handlers: {}, join: [], unsafe: [], options: {}},
{
extensions: [autolinkLiteral, strikethrough, table(options), taskListItem]
}
)
while (++index < length) {
extension = extensions[index]
// istanbul ignore next - unsafe always exists, for now.
unsafe = unsafe.concat(extension.unsafe || [])
handlers = Object.assign(handlers, extension.handlers || {})
}
return {unsafe: unsafe, handlers: handlers}
return Object.assign(config.options, {
handlers: config.handlers,
join: config.join,
unsafe: config.unsafe
})
}
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