Git Product home page Git Product logo

multimarkdownjs's Introduction

multimarkdownjs

A MultiMarkdown-6 JS parser.

Demo

NOTE: I don't think that you can use this library for production now, due to BIG size (~780 kB in asm.js version and ~350 for WASM version). But we work on it!

If you want to use this library, just include dist/multimarkdown.asm.js.

Then, you can use it like:

var html = MultiMarkdown.render("## Hello world!");

To set extension flags call:

MultiMarkdown.setExtensions(FLAG1 | FLAG2 | ...);

Extension flags table:

Flag Description
EXT_COMPATIBILITY Markdown compatibility mode
EXT_COMPLETE Create complete document
EXT_SNIPPET(Default) Create snippet only
EXT_SMART Enable Smart quotes
EXT_NOTES Enable Footnotes
EXT_NO_LABELS Don't add anchors to headers, etc.
EXT_PROCESS_HTML Process Markdown inside HTML
EXT_NO_METADATA Don't parse Metadata
EXT_OBFUSCATE Mask email addresses
EXT_CRITIC Critic Markup Support
EXT_CRITIC_ACCEPT Accept all proposed changes
EXT_CRITIC_REJECT Reject all proposed changes
EXT_RANDOM_FOOT Use random numbers for footnote links
EXT_TRANSCLUDE(Unused) Perform transclusion(s)

Extension flags can be accessed as MultiMarkdown.extensions.FLAG

If you use Smart qoutes extenstion, you can set Smart quotes language as:

MultiMarkdown.setLanguage(LANG);

Supported languages:

  • MultiMarkdown.languages.ENGLISH
  • MultiMarkdown.languages.DUTCH
  • MultiMarkdown.languages.FRENCH
  • MultiMarkdown.languages.GERMAN
  • MultiMarkdown.languages.GERMANGUILL
  • MultiMarkdown.languages.SWEDISH

How to build

Install latest Emscripten SDK to build library yourself.

Just call ./build.sh [asm|wasm] - calling without options will build for asm.js and WASM simultaneously.

You can find result files in dist folder.

multimarkdownjs's People

Contributors

strelok2012 avatar

Stargazers

Marc Pabst avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.