Hongdown: An opinionated Markdown formatter in Rust
23 points by hongminhee
23 points by hongminhee
I really like this. This is close to how I tend to write my Markdown documents (unless my editor's auto-formatting is fighting me, then I just surrender to it -- before this, anyway). There's a few conventions here I don't do but which I will likely start adopting, especially if I can wire in this tool as a linter to my editors (regrettably I bounce between a few) successfully.
Instead of trying to force order onto the chaotic nature of Markdown it is a better proposition to adopt a saner markup language with a different name, faster and simpler parsers, and inspired by Markdown:
There are many reasons to prefer Markdown over Djot such as wider support across existing tools and websites.
If you look at the STYLE.md linked from the README (https://github.com/dahlia/hongdown/blob/main/STYLE.md), many of the points presented in the style guide would apply equally well to Djot.
In my opinion, Djot fails just as hard as Markdown, right as the description begins:
_This is *regular_ not strong* emphasis -> Valid (emphasis)
*This is _strong* not regular_ emphasis -> Valid (strong)
[Link *](url)* -> Valid (link)
*Emphasis [*](url) -> Valid (emphasis)
No, no, no, and no! These are botched nesting, I want an error at compile time, not a surprise on the final result!
I agree it should be a compile error, but at least the behaviour would be consistent on Djot.