File tree Expand file tree Collapse file tree 1 file changed +86
-0
lines changed Expand file tree Collapse file tree 1 file changed +86
-0
lines changed Original file line number Diff line number Diff line change 1+ Why use ` cmark ` and not X?
2+ ==========================
3+
4+ ` hoedown `
5+ ---------
6+
7+ ` hoedown ` (which derives from ` sundown ` ) is slightly faster
8+ than ` cmark ` in our benchmarks (0.21s vs. 0.29s). But both
9+ are much faster than any other available implementations.
10+
11+ ` hoedown ` boasts of including "protection against all possible
12+ DOS attacks," but there are some chinks in the armor:
13+
14+ % time python -c 'print(("[" * 50000) + "a" + ("]" * 50000))' | cmark
15+ ...
16+ user 0m0.073s
17+ % time python -c 'print(("[" * 50000) + "a" + ("]" * 50000))' | hoedown
18+ ...
19+ 0m17.84s
20+
21+ ` hoedown ` has many parsing bugs. Here is a selection:
22+
23+ % hoedown
24+ - one
25+ - two
26+ 1. three
27+ ^D
28+ <ul>
29+ <li>one
30+
31+ <ul>
32+ <li>two</li>
33+ <li>three</li>
34+ </ul></li>
35+ </ul>
36+
37+
38+ % hoedown
39+ ## hi\###
40+ ^D
41+ <h2>hi\</h2>
42+
43+
44+ % hoedown
45+ [ΑΓΩ]: /φου
46+
47+ [αγω]
48+ ^D
49+ <p>[αγω]</p>
50+
51+
52+ % hoedown
53+ ```
54+ [foo]: /url
55+ ```
56+
57+ [foo]
58+ ^D
59+ <p>```</p>
60+
61+ <p>```</p>
62+
63+ <p><a href="/url">foo</a></p>
64+
65+
66+ % hoedown
67+ [foo](url "ti\*tle")
68+ ^D
69+ <p><a href="url" title="ti\*tle">foo</a></p>
70+
71+
72+ ` discount `
73+ ----------
74+
75+ ` cmark ` is about six times faster.
76+
77+ ` kramdown `
78+ ----------
79+
80+ ` cmark ` is about a hundred times faster.
81+
82+ ` kramdown ` also gets tied in knots by pathological input like
83+
84+ python -c 'print(("[" * 50000) + "a" + ("]" * 50000))'
85+
86+
You can’t perform that action at this time.
0 commit comments