Does anyone know of attempts or tools that let you run a code formatter on the embedded language snippets in a Markdown file?
I’ve seen other OSS projects do this and I love the consistency it brings to code samples.
I was hoping to explore something similar for nixpkgs documentation.
An alternative would be to define a simple literate programming structure for working with Markdown. Define nix expression snippets in a subdirectory and then interpolate them into the final markdown file. That feels like a bigger change that creates potential learning obstacles though.
I have written a pandoc filter that can be used in this way, but that also formats the entire document with pandoc, which may or may not be something we want.
That sounds great. If you are able, could you post the source to what you are trying? I wasn’t sure where the formatters: config would go. I may also be of use troubleshooting the error!