The Request
This is a request to add Graphviz (DOT) support to Markdown. This will allow us to easily embed editable and indexable graphs in questions and answers. I imagine it will be particularly useful for the theoretical CS site and for Stack Overflow itself, but I think any site of the many we have in SE-2.0 and the original trilogy can enjoy graph support.
I get a feeling this is going to get a very low priority, but perhaps the implementation is simple and more people than I expect will want this.
Usage Example
Example of what I mean - using the following (proposed) Markdown,
<dot>
digraph {
a -> b -> c;
b -> d;
}
</dot>
Will embed the image:
Generating the image can be as simple as giving that text as input to a server-installed copy of Graphviz and asking it to generate an image in return. The final result is just an image, so I don't see any potential abuse or security problem here.
Use Cases
There are currently over a hundred questions tagged graphviz on Stack Overflow, I'm guessing many of them would enjoy that feature, though obviously this isn't the use-case I am thinking about.
I've used Graphviz myself in two different posts I've made, but if anyone else knows of other posts that could have used it, feel free to add these examples here. My posts:
- Examples of Java APIs that demand an action sequence
- Is there a chart showing all unit upgrade paths in Civilization 5? (it no longer uses Graphviz though, but check out the revision history)
- How can I get a graphical representation of my dependencies with Spring.NET IoC?
<dot>...</dot>
strings, and replace them inline with client-side-rendered SVGs. But, of-course, SE built-in support for (even a subset of)graphviz
in questions and answers would be great. I know, i'd use it.