Parse selective rule comments from HTML, compatible
unified-message-control
.
Installation
# npm
npm install @selective/marker
# yarn
yarn add @selective/marker
Usage
const marker = require("@selective/marker");
const hastNode = {
type: "comment",
value: "selective ignore test",
};
const result = marker(hastNode);
console.log(result);
// {
// name: "selective",
// attributes: "ignore test",
// parameters: {
// ignore: true,
// test: true
// },
// {
// type: "comment",
// value: "selective ignore test"
// }
// }