An open API service indexing awesome lists of open source software.

https://github.com/dbolack-ab/marked-nonbreaking-spaces

Non-breaking space token for marked.js
https://github.com/dbolack-ab/marked-nonbreaking-spaces

Last synced: about 1 month ago
JSON representation

Non-breaking space token for marked.js

Awesome Lists containing this project

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

```js
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);
//

  This is a single space.\nThis adds      four!


```