Donokami / cli-marked

A Renderer for the marked project. Allowing you to render Markdown to print to your Terminal

Home Page:https://www.npmjs.com/package/cli-marked

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to cli-marked

Version Documentation Maintenance License: GPL-3.0 Downloads

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.

Install

npm i -g cli-marked

Example

md demo.md

This will produce the following:

Screenshot of marked-terminal

Screenshot of marked-terminal

Usage as module

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));

Run tests

npm run test

Author

👤Grigorii Horos

Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

License

Copyright © 2019 Grigorii Horos.

This project is GPL-3.0-or-later licensed.

About

A Renderer for the marked project. Allowing you to render Markdown to print to your Terminal

https://www.npmjs.com/package/cli-marked

License:MIT License


Languages

Language:JavaScript 100.0%