mdbook-graphviz icon indicating copy to clipboard operation
mdbook-graphviz copied to clipboard

Adding additional code->svg tools

Open dylanowen opened this issue 9 months ago • 4 comments

I've been working on an mdbook d2 renderer lately and most of the code is exactly the same as the graphviz code. It would be great to share some of the logic / backport the improvements I've made (svg zoom and pan) back to this repo.

I think there are a few ways we could do this:

  1. Make this a mono repo, rename it to mdbook-preprocessors, have a shared crate mdbook-inline-svg-preprocessor, then have each preprocessor inherit from mdbook-inline-svg-preprocessor.
  2. Have the same crate structure but in 3 different repos.
  3. Wrap everything up into 1 executable but still rename the repo.

Right now I'm inclined to go with Option 1. Option 2 seems too tedious to be reasonable. Option 3 seems compelling but I've been calling d2 via their golang library instead of the CLI which (while very powerful) introduces some interesting compilation requirements in osx. I wouldn't want to break graphviz rendering for any consumers outside of osx, especially if it proves challenging to setup the correct install for consumers without golang installs.

dylanowen avatar May 20 '24 05:05 dylanowen