Socket
Socket
Sign inDemoInstall

mdast-util-to-hast

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdast-util-to-hast - npm Package Compare versions

Comparing version 8.0.0 to 8.1.0

1

lib/index.js

@@ -28,2 +28,3 @@ 'use strict'

h.handlers = Object.assign({}, handlers, settings.handlers)
h.unknownHandler = settings.unknownHandler

@@ -30,0 +31,0 @@ visit(tree, 'footnoteDefinition', onfootnotedefinition)

2

lib/one.js

@@ -22,3 +22,3 @@ 'use strict'

var type = node && node.type
var fn = own.call(h.handlers, type) ? h.handlers[type] : null
var fn = own.call(h.handlers, type) ? h.handlers[type] : h.unknownHandler

@@ -25,0 +25,0 @@ // Fail on non-nodes.

{
"name": "mdast-util-to-hast",
"version": "8.0.0",
"version": "8.1.0",
"description": "mdast utility to transform to hast",

@@ -50,3 +50,3 @@ "license": "MIT",

"tinyify": "^2.0.0",
"xo": "^0.26.0"
"xo": "^0.27.0"
},

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

@@ -79,3 +79,3 @@ # mdast-util-to-hast

are found.
The default behaviour is to prefer the last duplicate definition.
The default behavior is to prefer the last duplicate definition.

@@ -87,2 +87,11 @@ ###### `options.handlers`

###### `options.unknownHandler`
Handler for all unknown nodes.
Default behavior:
* Unknown nodes with [`children`][child] are transformed to `div` elements
* Unknown nodes with `value` are transformed to [`text`][hast-text] nodes
##### Returns

@@ -98,4 +107,2 @@

* [`position`][position]s are properly patched
* Unknown nodes with [`children`][child] are transformed to `div` elements
* Unknown nodes with `value` are transformed to [`text`][hast-text] nodes
* [`node.data.hName`][hname] configures the hast element’s tag-name

@@ -283,7 +290,9 @@ * [`node.data.hProperties`][hproperties] is mixed into the hast element’s

* [`mdast-util-to-nlcst`](https://github.com/syntax-tree/mdast-util-to-nlcst)
— Transform mdast to nlcst
— transform mdast to nlcst
* [`hast-util-to-mdast`](https://github.com/syntax-tree/hast-util-to-mdast)
— transform hast to mdast
* [`hast-util-to-xast`](https://github.com/syntax-tree/hast-util-to-xast)
— transform hast to xast
* [`hast-util-sanitize`](https://github.com/syntax-tree/hast-util-sanitize)
— Sanitize hast nodes
* [`hast-util-to-mdast`](https://github.com/syntax-tree/hast-util-to-mdast)
— Transform hast to mdast
— sanitize hast nodes
* [`remark-rehype`](https://github.com/remarkjs/remark-rehype)

@@ -290,0 +299,0 @@ — rehype support for remark

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