@handbook/remark-split-html-lines
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@handbook/remark-split-html-lines

NPM TEST codecov

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.

Related Projects

Readme

Keywords

none

Package Sidebar

Install

npm i @handbook/remark-split-html-lines

Weekly Downloads

59

Version

1.1.0

License

MIT

Unpacked Size

6.56 kB

Total Files

8

Last publish

Collaborators

  • ssen