Skip to content
프로젝트

소개

mmd.js는 JavaScript로 작성된 매우 작고 독립 실행 가능한 미니멀 Markdown 파서입니다.

개발 도구

이 수치를 측정하는 방법

What you can do

  • Ordered lists 1
  • Unordered lists *
  • Inline <em> emphasis *
  • Inline <strong> emphasis **

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Hello, this is mmd.js

mmd.js is a standalone minimalist Markdown parser written in ~815 bytes of JavaScript.

All the cool kids use Markdown. If you are not familiar with it already, have a look at the original Markdown syntax. Check the source code of this page, it is written in Markdown and parsed using mmd.js.

Why so small ?

mmd.js is only small because of its simple design and feature set. Using dirty size optimization tricks it should be possible to reach the 5-600 bytes mark. Maybe smaller. Except that's not the idea. Enough yak shaving!

How does mmd.js work ?

The input text is split into blocks separated by one or more blank lines. The type of each block is determined by checking the first character of the block. Headers, HTML and paragraphs are handled separetely. Multi line blocks are split using a regular expression. HTML escaping and span elements ( link, images, emphasis ) are processed for each line of the blocks. This allow to be close to the original Markdown syntax.

How to use mmd.js ?

<script src=mmd.min.js></script>
<script>console.log( mmd('Markdown is **sweet**') );</script>

Supported features

  • Headers #
  • Blockquotes >
  • Ordered lists 1
  • Unordered lists *
  • Paragraphs
  • Links []()
  • Images ![]()
  • Inline <em> emphasis *
  • Inline <strong> emphasis **

Unsupported features

  • References and IDs
  • Escaping of Markdown characters
  • Nesting

Supported browsers

So far mmd.js has been tested in recent versions of Opera ( all flavours including Mini ), Chrome and Firefox. Pull requests addressing compatibility issues are most welcome, esp. regarding IE and Safari.

Why ?

mmd.js is the result of some very intensive yak shaving. Let's be honest, it was just an excuse to procastinate and do something different.

License

MIT

That's all folks.

관련 프로젝트 살펴보기

불러오는 중…