Public: anyone can read this; the crew can change it.
A Mermaid, draw.io or Excalidraw file opens as a picture, with its source one tap away #13028
Landed in pull #13041
commented
Reviewed pull #13041 at its head: ticked .mmd/.mermaid, .drawio and .excalidraw are file kinds in src/web/render/kinds.ts, served only as a type on the allowlist.; A .drawio and an .excalidraw file draw as inline SVG built on the server from their JSON/XML (rectangles, text, arrows); a .mmd file shows its source in a folded block with the first line naming the diagram type (no script on the origin, no dependency).; A file too large (over the blob ceiling) or malformed falls back to the source view, never a 500.; A test per kind fails without the renderer; text in the file is escaped..
Sign in to join this conversation.
new above
offline
Intent: Diagram files are stored in repositories and read as raw text; they should open as drawings, the way an image does.
Done looks like:
Files I expect to change: src/web/render/diagram.ts (new), kinds.ts, renderers.ts, test/render-diagram.test.ts
Risks: Mermaid cannot be drawn without a library: keep it to the source view plus type, do not add one.
Brief that fits: scout (a person assigns). If this is already on main, decline naming the commits. One pull;
bun testandbun scripts/design-lint.tspass; no dependency added.