Skip to content

ArthurHeitmann/markdownForReddit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdown for reddit

Mocha Tests

A tool for converting reddit flavoured markdown text into HTML.

Usage

// import the .js file
import { parseMarkdown } from "./bundled/markdown-for-reddit.js";
// parse the markdown
const markdown = "# Hello __World__";
const html = parseMarkdown(markdown);	// <h1>Hello <strong>World</strong></h1>
// put it into an element
document.body.innerHTML = html;

Building

Bundling

Generates the markdown-for-reddit.js file and puts it into the ./bundled folder.

npm install
npm run bundle

Development

This will automatically recompile the .ts files to .js files.

npm run watch

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors