QuartoNotebookRunner.jl
QuartoNotebookRunner.jl copied to clipboard
Ignore html MIME type for Julia's markdown
It's pretty annoying that standard md"some markdown" objects have the text/html MIME type defined because this will be preferred by quarto as a "higher" MIME type, even though as it's a markdown based format that doesn't really make sense. I think it's really common that people want to splice in parts of markdown into a document, and it's just confusing if that partially breaks because of intermediate HTML conversion. Especially if the markdown contains syntax specifically meant for quarto/pandoc postprocessing.
So my proposal is to special case just Julia's included markdown type Markdown.MD and ignore its html MIME type. The only other alternative is for every user to define or load from some other package a separate markdown object which doesn't have html conversion defined.
Would ignoring text/html, if there is text/markdown available, be sufficient? Instead of doing some special casing of types.
I guess so, but usually html would be richer than markdown (let's say for table packages that define both). I'm just arguing that if you specifically constructed a Markdown object, it seems sensible to use that.
Another issue that does impact this somewhat. Markdown stdlib implements a flavour of markdown that isn't quite the same as markdown pandoc uses, so just using the text/markdown will likely result in incorrect rendering in some cases unfortunately.
Ah I didn't consider markdown flavors, I guess the mimetype doesn't reflect the flavor used. I guess people can still go the route where they print to stdout instead of letting markdown objects be rendered via display system, although it's not as straightforward.
I don't think there's much we can really do here @jkrumbiegel.