Package Exports
- mdast-comment-marker
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mdast-comment-marker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
mdast-comment-marker

Parse an MDAST comment marker.
Installation
npm:
npm install mdast-comment-markerUsage
var marker = require('mdast-comment-marker');
console.log(marker({
type: 'html',
value: '<!--foo-->'
}));
console.log(marker({
type: 'html',
value: '<!--foo bar baz=12.4 qux="test test" quux=\'false\'-->'
}));
console.log(marker({
type: 'html',
value: '<!doctype html>'
}));Yields:
{ name: 'foo',
attributes: '',
parameters: {},
node: { type: 'html', value: '<!--foo-->' } }
{ name: 'foo',
attributes: 'bar baz=12.4 qux="test test" quux=\'false\'',
parameters: { bar: true, baz: 12.4, qux: 'test test', quux: false },
node:
{ type: 'html',
value: '<!--foo bar baz=12.4 qux="test test" quux=\'false\'-->' } }
nullAPI
marker(node)
Parse a comment marker.
Parameters
node(Node) — Node to parse
Returns
Marker? — Information, when applicable.
Marker
A comment marker.
Properties
name(string) — Name of markerattributes(string) — Value after nameparameters(Object) — Parsed attributes, tries to convert values to numbers and booleans when possiblenode(Node) — Reference to given node
Contribute
See contributing.md in syntax-tree/mdast for ways to get
started.
This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.