A regular expression Markdown parser, written in functional Javascript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Added a live page for the project Mar 24, 2017
LICENSE Initial commit Mar 21, 2017
README.md Updated README.md Mar 21, 2017
parsemd.js Added source code, updated README Mar 21, 2017

README.md

Parse-MD.js

A regular expression Markdown parser, written in functional Javascript.

Usage

Include the javascript file in your page, then simply call parseMarkdown:

var parsedMD = parseMarkdown(yourMarkdownVar);

The parser will parse the contents of yourMarkdownVar into parsedMD as HTML.

Recognized Syntax

  • Headers are only available using the # syntax:
# Heading 1
## Heading 2
### Heading 3
  • Italics and bold are available using asterisks:
*Italics* and **bold**
  • Unordered lists are available using either - or + and ordered lists are available using 1., 2. etc:
 - Unordered list item 1
 + Unordered list item 2

 1. Ordered list item 1
 2. Ordered list item 2

Note that list nesting is not supported and might cause unexpected behavior.

  • Links are only available using the [title](link_url) syntax and images are only available using the ![title](image_url) syntax:
[link_title](https://github.com/Chalarangelo/parse-md-js)
![image_tite](https://github.com/Chalarangelo/parse-md-js/image.png)
  • Inline code can be written using the ` symbol and code blocks are only available using single tab indentation:
`code goes here`

	code block
  • Single line blockquotes are available using the > symbol:
> blockquote
  • Horizontal rules are available using either --- or ===:
 ---
 ===
  • Line breaks are only supported using two or more newline characters.

  • Tables, inline HTML and Youtube vide embedding are not supported.

License

The source code is licensed under the MIT license.