News for hackers. Stuff that matters.
Re:Show HN: Ferrite – Markdown editor in Rust with native Me... by nkmnz on Sunday January 11, 2026 @06:34AM (#46574735)
Slightly off topic: is there any editor (and data format) that supports re-arranging mermaid charts? I often find myself wanting to slightly tweak the way the chart is rendered, e.g. moving around boxes so that some of them are clustered in a specific area etc.
Re:Show HN: Ferrite – Markdown editor in Rust with native Me... by OlaProis on Sunday January 11, 2026 @06:57AM (#46574914)
Currently Mermaid doesn't support manual positioning — the layout is algorithmic (Sugiyama-style for flowcharts). Some workarounds: - Use subgraph blocks to cluster related nodes - Adjust edge order in source to influence layout - D2 (another diagram language) has better manual positioning

For v0.3.0's standalone crate, I'm considering whether to expose layout hints. What specific use case do you have — documentation, architecture diagrams?

Re:Show HN: Ferrite – Markdown editor in Rust with native Me... by nkmnz on Monday January 12, 2026 @01:40PM (#46592444)
Mostly clustering and sorting, but most importantly, I use diagrams not only as a tool for communication, but also as a tool to think visually. Moving boxes around would be a huge benefit for that use case, while I still want to have the diagram as code for version control etc pp
Re:Show HN: Ferrite – Markdown editor in Rust with native Me... by OlaProis on Tuesday January 13, 2026 @05:25AM (#46599232)
Visual thinking use case makes sense!

The challenge is Mermaid is declarative — layout is computed, not specified. Some options I'm considering:

1. layout hints/constraints in the syntax,

2. export to SVG then use a proper editor like Excalidraw for repositioning. For now, influencing layout via subgraphs and edge ordering is the best workaround."

3. separate system for that, maybe to be included in the crate, would only work in Ferrite in the start

Re:Show HN: Ferrite – Markdown editor in Rust with native Me... by OlaProis on Tuesday January 13, 2026 @05:40AM (#46599321)
Actually, this is going on the v0.3.0 roadmap. I've been looking for ways to make the standalone mermaid-rs crate genuinely better than just 'mermaid.js but Rust.'

The plan: use %% comments as layout hints. Something like:

%% @pos NodeA 100 200>

Mermaid.js ignores these, so the diagram stays portable. But Ferrite (and anyone using mermaid-rs) could parse them for manual positioning.

You'd be able to drag nodes around in Ferrite, have positions saved to the source, and still share with mermaid.js users (they'd get auto-layout).

If you want to follow progress or have input on the syntax, feel free to open an issue on the repo!