Hacker News new | ask | show | jobs
by je42 72 days ago
Writing mark down linter, i am i nterested in - if you think that you requirements for markdown formatting could be encoded in (relatively) simple rules?
3 comments

Commommark is the best, then looking at the most commonly implemented extensions:

- Superscript with hat symbol (^)

- Hidden content (also known as spoiler tags, content warnings, click-to-reveal, etc...) with two pipe symbols (||) at start and end of hidden content. Interact with the content to show the content inside.

- Table syntax to show tabular data and align content with pipe, hyphen, colon symbols

---

After that, I'd look at the extensions that are only useful for the use-case you're targeting:

- Subscripting with tilde symbol (~)

- IDs, Classes and Attributes

- Task lists

- Sections / Containers

- Language labels for code blocks

- Math Support (mathml, latex, katex, etc...)

- Table of Contents / Footnotes

- Definition lists

- etc...

Just search "Markdown grammar"
Check out commonmark