Markdown fences
puml natively understands fenced code blocks in Markdown. This means you can keep prose and diagrams in the same source file and lint or render them in one pass.
Supported fence languages
| Fence | Routed to |
|---|---|
puml | PlantUML/PicoUML auto |
pumlx | PlantUML extended |
picouml | PicoUML (first-class) |
plantuml | PlantUML |
uml | PlantUML auto |
puml-sequence | PlantUML sequence family |
uml-sequence | PlantUML sequence family |
mermaid | Mermaid adaptation |
Inline preview
On this site, supported diagram fences get a small preview control that renders locally in your browser with the same WASM renderer as the studio editor.
@startuml
actor Writer
participant Docs
Writer -> Docs: open Markdown page
Docs --> Writer: inline SVG preview
@enduml
Example
Render the document:
--from-markdown is automatically enabled for .md, .markdown, and .mdown files.
Output naming
When rendering markdown with --multi, output paths are deterministic:
- File input:
<markdown-stem>_snippet_<n>.svg(or_snippet_<n>-<page>.svgfor multi-page fences). - Stdin input:
snippet-<n>.svg(orsnippet-<n>-<page>.svgfor multi-page fences).
Deep dive
See the Markdown fence renderer spec for the full extraction protocol, edge cases, and CI integration patterns.