mdast-util-to-hast
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -13,2 +13,3 @@ 'use strict'; | ||
var footer = require('./footer'); | ||
var handlers = require('./handlers'); | ||
@@ -24,2 +25,3 @@ /* Factory to transform. */ | ||
h.augment = augment; | ||
h.handlers = xtend(handlers, (settings.handlers || {})); | ||
@@ -26,0 +28,0 @@ visit(tree, 'footnoteDefinition', visitor); |
@@ -8,3 +8,2 @@ 'use strict'; | ||
var all = require('./all'); | ||
var handlers = require('./handlers'); | ||
@@ -23,3 +22,3 @@ /* Transform an unknown node. */ | ||
var type = node && node.type; | ||
var fn = has(handlers, type) ? handlers[type] : null; | ||
var fn = has(h.handlers, type) ? h.handlers[type] : null; | ||
@@ -26,0 +25,0 @@ /* Fail on non-nodes. */ |
{ | ||
"name": "mdast-util-to-hast", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "Transform MDAST to HAST", | ||
@@ -15,4 +15,4 @@ "license": "MIT", | ||
], | ||
"repository": "https://github.com/wooorm/mdast-util-to-hast", | ||
"bugs": "https://github.com/wooorm/mdast-util-to-hast/issues", | ||
"repository": "https://github.com/syntax-tree/mdast-util-to-hast", | ||
"bugs": "https://github.com/syntax-tree/mdast-util-to-hast/issues", | ||
"author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)", | ||
@@ -19,0 +19,0 @@ "contributors": [ |
@@ -52,2 +52,8 @@ # mdast-util-to-hast [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] | ||
###### `options.handlers` | ||
Object mapping [MDAST nodes][mdast] to functions | ||
handling those elements. | ||
Take a look at [`lib/handlers/`][handlers] for examples. | ||
###### Returns | ||
@@ -79,9 +85,9 @@ | ||
[travis-badge]: https://img.shields.io/travis/wooorm/mdast-util-to-hast.svg | ||
[travis-badge]: https://img.shields.io/travis/syntax-tree/mdast-util-to-hast.svg | ||
[travis]: https://travis-ci.org/wooorm/mdast-util-to-hast | ||
[travis]: https://travis-ci.org/syntax-tree/mdast-util-to-hast | ||
[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/mdast-util-to-hast.svg | ||
[codecov-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-to-hast.svg | ||
[codecov]: https://codecov.io/github/wooorm/mdast-util-to-hast | ||
[codecov]: https://codecov.io/github/syntax-tree/mdast-util-to-hast | ||
@@ -94,12 +100,14 @@ [npm]: https://docs.npmjs.com/cli/install | ||
[mdast]: https://github.com/wooorm/mdast | ||
[mdast]: https://github.com/syntax-tree/mdast | ||
[hast]: https://github.com/wooorm/hast | ||
[hast]: https://github.com/syntax-tree/hast | ||
[mdast-yaml]: https://github.com/wooorm/mdast#yaml | ||
[mdast-yaml]: https://github.com/syntax-tree/mdast#yaml | ||
[mdast-html]: https://github.com/wooorm/mdast#html | ||
[mdast-html]: https://github.com/syntax-tree/mdast#html | ||
[unist-position]: https://github.com/wooorm/unist#location | ||
[unist-position]: https://github.com/syntax-tree/unist#location | ||
[hast-util-sanitize]: https://github.com/wooorm/hast-util-sanitize | ||
[hast-util-sanitize]: https://github.com/syntax-tree/hast-util-sanitize | ||
[handlers]: lib/handlers |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
20720
528
111