developit / developit/snarkdown
Sharing Inspiration
- Vorherrschende Sprache
- JavaScript
- Sterne
- 2.4k
- Forks
- 116
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Y'all may be able to appreciate the technique behind [my parser](https://github.com/mikesmullin/m-js/blob/1d884d21d8b8cdf0da78b1907242d3f8d4bbf05a/src/extras/markdown-jxml.js#L8) which is also minimalist ~1.5KB minified.
It doesn't support all the cases (still need to add image, table, blockquote) but it supported enough to make this full set of documentation, lol:
https://mikesmullin.github.io/m-js/
the secret is between the regex and the reusable [`chunker()`](https://github.com/mikesmullin/m-js/blob/1d884d21d8b8cdf0da78b1907242d3f8d4bbf05a/src/utils.js#L165) function, also how regex is used by the lexer with special 1-character symbols representing fully parsed tokens.
it parses to JXML instead of HTML but once you understand how simple it is you can see how it would be easy to adapt without adding extra lines.
that is all 🐱 feel free to assimilate any ideas on your quest for a sub-1k parser. thanks for your time.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Read src/extras/markdown-jxml.js and src/utils.js around the reusable chunker() function, then compare the generated documentation at the linked site. The issue shares parser ideas and mentions image, table, and blockquote support, but it does not define a requested change or acceptance criteria.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 15/100