Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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.

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 = `
# Title

And *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 = `
# Title

And *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/)