JSPM

  • Created
  • Published
  • Downloads 2328
  • Score
    100M100P100Q137689F
  • License MIT

Hast to html converter

Package Exports

  • @starptech/prettyhtml-hast-to-html

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 (@starptech/prettyhtml-hast-to-html) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@starptech/prettyhtml-hast-to-html

HAST to HTML converter

The implementation is a derivated from ast-util-to-html (Version 3.1.0) with the goal to apply custom rules for custom web elements and more.


npm install --save @starptech/prettyhtml-hast-to-html

Modifications

  • Don't kebab case on custom element attributes.
  • Indent attributes of custom elements with 2 spaces.
  • Insert newline for closing custom element tags when element has attributes or child nodes.
  • Don't encode attribute values
  • Don't omit value behind boolean attributes