Snarkdown VS Everyone Else (v2)

Revision 2 of this benchmark created on


Description

Snarkdown is fast.

Preparation HTML

<!-- snarkdown -->
<script src="https://rawgit.com/developit/snarkdown/master/snarkdown.js"></script>

<!-- commonmark.js -->
<script src="https://spec.commonmark.org/js/commonmark.js"></script>
<script>
function _commonmark(md) {
    var parsed = _commonmark.reader.parse(md);
    return _commonmark.writer.render(parsed);
}
_commonmark.writer = new commonmark.HtmlRenderer();
_commonmark.reader = new commonmark.Parser();
</script>

<textarea id="md" readonly>
Markdown Parser
===============

*[Snarkdown](http://github.com/developit/snarkdown)* is __easy__ to `use`.


[Example Link](#example)

Two newlines creates a line break.

Or, end a line with two spaces.  
Just like that!

Code & Poetry
-------------

    You can also indent
    blocks to display
    code or poetry.
    
    Indented code/poetry blocks  
    can be hard-wrapped.

*Or, wrap your code in three backticks:*

```JavaScript
function codeBlocks() {
    return 'Can be inserted';
}
```


### Block Quotes

> You can insert quotes by
> preceeding each line with `>`.
>
> Blockquotes can also contain line  
> breaks.


## Lists

- Unordered
* Lists
+ Of mixed type

1. Ordered
2. Lists
4. Numbers are ignored
</textarea>

Setup

var md = document.getElementById('md').value,
        html;

Test runner

Ready to run.

Testing in
TestOps/sec
Snarkdown
html = snarkdown(md);
ready
CommonMark
html = _commonmark(md);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.