Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrvautin/downa
A teeny tiny Markdown to HTML renderer which works in Node and the browser.
https://github.com/mrvautin/downa
html markdown markdown-converter markdown-parser regex renderer
Last synced: 12 days ago
JSON representation
A teeny tiny Markdown to HTML renderer which works in Node and the browser.
- Host: GitHub
- URL: https://github.com/mrvautin/downa
- Owner: mrvautin
- License: mit
- Created: 2018-03-03T21:36:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-01T23:31:14.000Z (almost 2 years ago)
- Last Synced: 2024-10-14T09:17:28.122Z (26 days ago)
- Topics: html, markdown, markdown-converter, markdown-parser, regex, renderer
- Language: JavaScript
- Size: 702 KB
- Stars: 21
- Watchers: 2
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# downa
> A teeny tiny (2KB) Markdown to HTML renderer which works in Node and the browser.
## Installation:
`downa` works in the browser and Node.js.
`npm i downa --save`
### Browser:
``
or CDN
``
> Note: no other dependencies are required. See: test.html for example
## Usage:
### Node:
``` javascript
const downa = require('downa');const md = `
# TitleAnd *now* [a link](http://www.google.com) to **follow** and [another](http://yahoo.com/).
* One
* Two
* Three## Subhead`;
const html = downa.render(md);
console.log('HTML', html);
```### Browser:
``` javascript
document.addEventListener("DOMContentLoaded", function() {
var markdown = `
# TitleAnd *now* [a link](http://www.google.com) to **follow** and [another](http://yahoo.com/).
* One
* Two
* Three## Subhead`;
var html = downa.render(markdown);
console.log('HTML', html);
});```
### Example:
[See fiddle](https://jsfiddle.net/mrvautin/zed49ajn/4/)