JSPM

marked-nonbreaking-spaces

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 56
  • Score
    100M100P100Q74968F
  • License MIT

Nonbreaking Spaces for Marked.js

Package Exports

    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 (marked-nonbreaking-spaces) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    marked-nonbreaking-spaces

    Insert any number of   non-breaking spaces into the document.

    The basic token is :>. Additional spaces may be added by adding additional greater-than (>) to the sequence. :>>> would result in    . This token may be used inside a block.

    Usage

    const marked = require("marked");
    const markedNonbreakingSpaces = require("marked-nonbreaking-spaces");
    
    marked.use(markedNonbreakingSpaces());
    
    const html = marked.parse(":> This is a single space.\nThis adds :>>>> four!");
    console.log(html);
    // <p>&nbsp; This is a single space.\nThis adds &nbsp;&nbsp;&nbsp;&nbsp; four!</p>