-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
metaRelated to Refined GitHub itselfRelated to Refined GitHub itself
Description
Originally posted by @fregante in #3678 (comment):
I'd like to see the most lightweight Markdown parser being run directly to the description text to store HTML so the entire
parseDescriptionfunction can be dropped.Parser example: Holixus/nano-markdown
bundlephobia.com/result?p=nano-markdown@1.2.1
I've done a little comparison between multiple lightweight Markdown parsers, and I don't think we can directly use any of them 🙁
Features they should support:
- code span with single backtick:
`` ` `` - code span with a backticked word:
`` `bla` `` - inline URLs:
https://example.orgor<https://example.org> - don't escape HTML tags:
**bold** or <b>bold</b>
| Parser | Size | 1. single backtick | 2. backticked word | 3. inline URLs | 4. don't escape HTML |
|---|---|---|---|---|---|
| nano-markdown | 2kB | ❌ | ❌ | ❌ | ✔️ |
| snarkdown | 2kB | ❌ | ❌ | ❌ | ✔️ |
| downa | 1.9kB | ❌ | ❌ | ❌ | ✔️ |
| md.js | 2.7kB | ❌ | ❌ | ❌ | ✔️ |
| tinydown | 4kB | ✔️ | ✔️ | ❌ | ❌ |
| drawdown | 1.5kB 1) | ✔️ | ❌ | ❌ | ❌ |
| mmd.js | 0.8kB 2) | ❌ | ❌ | ❌ | ❌ |
Notes:
- not distributed via npm, 2.8kB unminified, about 1.5kB minified
- not distributed via npm, 1.0kB unminified, 0.8kB minified
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
metaRelated to Refined GitHub itselfRelated to Refined GitHub itself