1.1.0 • Published 3 years ago
@handbook/remark-split-html-lines v1.1.0
@handbook/remark-split-html-lines
How to usage
import unified from 'unified';
export const processor = unified()
.use(require('remark-parse'))
.use(require('@handbook/remark-split-html-lines'))
.use(require('@handbook/remark-magic-comments'))
.use(require('remark-stringify'), {
listItemIndent: 1,
});
What does this do?
When you have an AST tree like below.
[
{
"type": "html",
"value": "<details>\n<summary>Detail</summary>\n\n<!-- source test.ts -->"
}
]
It converted to like below.
[
{
"type": "html",
"value": "<details>"
},
{
"type": "html",
"value": "<summary>Detail</summary>"
},
{
"type": "html",
"value": ""
},
{
"type": "html",
"value": "<!-- source test.ts -->"
}
]
See more
@handbook/*
This package is one of@handbook/*
packages. Go to the project home and see more details.