This is a Quarto filter extension that uses bytefield-svg to parse the bytefield DSL from quarto code block, generate the SVG and replace it in the HTML.
quarto add crisbour/bytefieldThis will install the extension under the _extensions subdirectory.
If you're using version control, you will want to check in this directory.
To generate the SVG for the bytefield DSL, you would likely want to use
{.bytefield} as the code block class. {bytefield} works as well, but it will
cause Quarto to require a jupyter kernel unnecessary.
```{.bytefield}
(draw-column-headers)
(draw-box "Address" {:span 4})
(draw-box "Size" {:span 2})
(draw-box 0 {:span 2})
(draw-gap "Payload")
(draw-bottom)
```
The documentation for the bytefield-svg
DSL
Here is the source code for a minimal example: example.qmd.
[WARN] I am not sure whether the best approach is to attach installed npm package