This is very cool, some ideas for future work:
- email support here is going to be ultra weak cause it is likely to require very rich feature from email that you can not deliver
I would recommend adding a reduce_cooked
email hook (see https://github.com/discourse/discourse/blob/4ad924bcf5acb6c99868887b2a402b7b5f289771/lib/pretty_text.rb#L381-L388 ) you can use image magick to convert SVG to an image, create an upload, tie to post and then add it there. It is fiddly but would add value.
- This hack is interesting, cause you could make this wider and support graphviz https://github.com/mdaines/viz.js/