Skip to content

Commit 37e69c9

Browse files
committed
graphviz: allow overriding the engine
This can be done like so: ```graphviz {.engine="neato"} digraph diagram { A -> B } ``` Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 6e89300 commit 37e69c9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

layouts/_default/baseof.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
graphAttributes: {
2626
bgcolor: "transparent",
2727
},
28+
engine: x.getAttribute("engine") || "dot",
2829
}
2930
const svg = vizInstance.renderString(x.innerText, options)
3031
const img = document.createElement('img')
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<pre class="graphviz">
1+
<pre class="graphviz"{{ if (and (isset "engine" .Attributes) (ne "" .Attributes.engine)) }} engine="{{ .Attributes.engine }}"{{ end }}>
22
{{- .Inner | htmlEscape | safeHTML -}}
33
</pre>
44
{{- .Page.Store.Set "hasGraphviz" true }}

0 commit comments

Comments
 (0)