Hongdown: An opinionated Markdown formatter in Rust

https://github.com/dahlia/hongdown

20 points · 7 comments · view on lemmy.world

7 Comments

rtxn@lemmy.world · 4 pts · 226d (1 reply)

Exactly which flavours of Markdown are targeted/required by this specification?

hongminhee@lemmy.ml · 2 pts · 226d

Basically a combination of GFM with a few extensions such as definition lists!

FizzyOrange@programming.dev · 0 pts · 226d (4 replies)

Very weird style. Inconsistent heading styles. Four tilde code blocks? That's totally nonstandard. Why?

hongminhee@lemmy.ml · 4 pts · 225d (2 replies)

Thanks for the feedback! The style choices are intentional and all valid CommonMark:

  • Heading styles: Setext (===/---) for H1/H2 makes major sections visually prominent in plain text, while ATX (###) is used for deeper levels. This hybrid approach optimizes readability in the raw source.

  • Four tildes: Tildes are valid CommonMark delimiters, just less common. They're chosen because code often contains backticks (shell commands, string literals), so tildes avoid visual clutter.

The core philosophy is that Markdown should be readable as plain text, not just after rendering. These choices prioritize scanning structure in a text editor. That said, it's definitely an opinionated style—not for everyone!

flying_sheep@lemmy.ml · 3 pts · 225d

I like the heading styles! The tildes are unusual but the reasoning is sound!

FizzyOrange@programming.dev · -1 pts · 225d

code often contains backticks

I've never seen code contain three backticks though.

I guess your heading logic kind of makes sense but tbh I still hate it.

gianni@lemmy.ca · -1 pts · 226d

Because Hong.