All Projects → egoist → Md

egoist / Md

Licence: mit
A markdown parser and compiler. Built for speed.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Md

Craftinginterpreters
Repository for the book "Crafting Interpreters"
Stars: ✭ 4,298 (+3257.81%)
Mutual labels:  compiler, markdown, parser
Marked
A markdown parser and compiler. Built for speed.
Stars: ✭ 26,556 (+20646.88%)
Mutual labels:  compiler, markdown, parser
Radon
A scripting language.
Stars: ✭ 22 (-82.81%)
Mutual labels:  compiler, parser
Parsedown Extra Plugin
Configurable Markdown to HTML converter with Parsedown Extra Plugin.
Stars: ✭ 47 (-63.28%)
Mutual labels:  markdown, parser
Marko
A markdown parser with high extensibility.
Stars: ✭ 77 (-39.84%)
Mutual labels:  markdown, parser
Ngx Markdown
Angular markdown component/directive/pipe/service to parse static, dynamic or remote content to HTML with syntax highlight
Stars: ✭ 687 (+436.72%)
Mutual labels:  markdown, parser
Markdown Wasm
Markdown parser and HTML generator implemented in WebAssembly, based on md4c
Stars: ✭ 833 (+550.78%)
Mutual labels:  markdown, parser
Charly Vm
Fibers, Closures, C-Module System | NaN-boxing, bytecode-VM written in C++
Stars: ✭ 66 (-48.44%)
Mutual labels:  compiler, parser
Compiler
The Hoa\Compiler library.
Stars: ✭ 458 (+257.81%)
Mutual labels:  compiler, parser
Fcc
Fedjmike's C Compiler
Stars: ✭ 101 (-21.09%)
Mutual labels:  compiler, parser
Elm Markdown
Pure Elm markdown parsing and rendering
Stars: ✭ 96 (-25%)
Mutual labels:  markdown, parser
Fathom
🚧 (Alpha stage software) A declarative data definition language for formally specifying binary data formats. 🚧
Stars: ✭ 111 (-13.28%)
Mutual labels:  compiler, parser
Remarkable
Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.
Stars: ✭ 5,252 (+4003.13%)
Mutual labels:  markdown, parser
Webassemblyjs
Toolchain for WebAssembly
Stars: ✭ 566 (+342.19%)
Mutual labels:  compiler, parser
React Markdown Editor Lite
a light-weight Markdown editor based on React. 一款轻量的基于React的markdown编辑器
Stars: ✭ 553 (+332.03%)
Mutual labels:  markdown, parser
React Native Markdown Package
React native markdown package is a Library for implementing markdown syntax in React Native
Stars: ✭ 50 (-60.94%)
Mutual labels:  markdown, parser
Commonmark Java
Java library for parsing and rendering CommonMark (Markdown)
Stars: ✭ 1,675 (+1208.59%)
Mutual labels:  markdown, parser
Tinyrb
A tiny subset of Ruby with a Lua'esc VM
Stars: ✭ 452 (+253.13%)
Mutual labels:  compiler, parser
Minigo
minigo🐥is a small Go compiler made from scratch. It can compile itself.
Stars: ✭ 456 (+256.25%)
Mutual labels:  compiler, parser
Dataformsjs
🌟 DataFormsJS 🌟 A minimal JavaScript Framework and standalone React and Web Components for rapid development of high quality websites and single page applications.
Stars: ✭ 95 (-25.78%)
Mutual labels:  compiler, markdown

md

NPM version NPM downloads Build Status codecov donate

This is a fork of marked

Why?

  • Actively maintained
  • Rewrote in ES6 and bundled with Rollup for smaller size (15KB)
  • Support more GFM extras like task lists

Install

yarn add md

You can find a CDN version at https://unpkg.com/md/

Usage

const md = require('md')

const html = md(`## hello world

A modern **markdown** parser!

- [ ] todo
- [x] done
`)

You can preview the HTML result here: https://egoist.moe/md2html/ (source)

API

md(src, [options])

src

Type: string
Required: true

Input markdown string.

options

All marked options plus:

taskLists

Type: boolean
Default: true

Enable GFM task lists, this will only work if options.gfm is true.

linksInNewTab

Type: boolean | (href: string) => boolean
Default: undefined

Open links in a new window/tab.

dataLine

Type: boolean
Default: true

Add data-line attribute to <pre> tag for code fences, it's useful with the line-highlight plugin in PrismJS.

```js{1}
console.log('hi')
```

This will yield:

<pre data-line="1"><code class="lang-js">console.log('hi')</code></pre>

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Development

# lint and unit test
yarn test

# lint only
yarn lint

# fix lint issues
yarn lint -- --fix

Author

md © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoist.moe · GitHub @egoist · Twitter @_egoistlily

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].