mdast-util-hast
v0.0.1
Published
Utilities to work with hast attributes in mdast
Downloads
1
Maintainers
Readme
mdast-util-hast
Utilities to work with hast attributes in mdast.
Content
What is this?
This package provides a few helper functions to add hast properties to your mdast. With the following functions you can control the generated HTML:
getHProperties
: get the hProperties and set any property on the generated HTML elementaddHClasses
: sets the hPropertyclass
and makes sure not to introduce duplicatessetHName
: set the tag name of the HTML element
When should I use this?
If you want to add hast attributes to your mdast in order to control the generated HTML.
Install
This package is ESM only.
In Node.js (version 12.20+, 14.14+, or 16.0+), install with npm
:
npm install mdast-util-hast
Use
This is still in very early alpha, hence, I can only provide very little documentation.
Use at your own risk.