Custom Renderer for marked allowing for printing Markdown to the Terminal. Supports pretty tables and syntax highlighting
Could for instance be used to print usage information.
npm i -g cli-marked
md demo.md
This will produce the following:
npm i cli-marked
const marked = require('marked');
const TerminalRenderer = require('cli-marked');
marked.setOptions({
renderer: new TerminalRenderer({}),
mangle: false,
emoji: true,
breaks: false,
gfm: true,
smartypants: false,
});
const markdown = `
# Hello World
---
* One
* Two
* Three
`
console.log(marked(markdown));
npm run test
👤Grigorii Horos
- Github: @horosgrisa
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
Copyright © 2019 Grigorii Horos.
This project is GPL-3.0-or-later licensed.