@love-rox/kumihimo-rehype
v0.9.3
Published
rehype plugin rendering kumihimo code blocks into inline SVG signal flow diagrams
Maintainers
Readme
@love-rox/kumihimo-rehype
rehype plugin for Markdown pipelines for kumihimo — AV signal flow diagrams (系統図) written as text.
pnpm add @love-rox/kumihimo-rehypeTurns kumihimo code fences into inline SVG at build time.
```kumihimo
cam.SDI -> sw.1 : sdi 30m "V-01"
```import rehypeKumihimo from '@love-rox/kumihimo-rehype';
unified()
.use(remarkParse)
.use(remarkRehype)
.use(rehypeKumihimo, { theme: 'dark', onDiagnostics: report })
.use(rehypeStringify);The SVG is parsed into HAST in the SVG namespace rather than emitted as a raw node, so no
rehype-raw is needed and no sanitiser silently drops the drawing.
Use onDiagnostics if you would rather not publish a nice-looking picture of faulty
wiring.
See kumihimo.love-rox.cc for the guide and an editor you can type into, or the project README for the other packages.
License
MIT © SASAGAWA Kiyoshi
