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
- Host: GitHub
- URL: https://github.com/dbolack-ab/marked-nonbreaking-spaces
- Owner: dbolack-ab
- License: mit
- Created: 2025-02-12T23:00:49.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-05T17:22:10.000Z (3 months ago)
- Last Synced: 2025-03-05T18:49:04.603Z (3 months ago)
- Language: JavaScript
- Size: 886 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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!
```