File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,8 @@ <h1 data-pagefind-meta="title">About{{ if (isset .Params "subtitle") }} - {{ .Pa
204
204
let vizInstance
205
205
[ ...document . querySelectorAll ( "pre[class=graphviz]" ) ] . forEach ( async ( x ) => {
206
206
if ( ! vizInstance ) vizInstance = await Viz . instance ( )
207
- const svg = vizInstance . renderSVGElement ( x . innerText )
207
+ const engine = x . getAttribute ( "engine" ) || undefined
208
+ const svg = vizInstance . renderSVGElement ( x . innerText , { engine } )
208
209
x . parentNode . insertBefore ( svg , x ) ;
209
210
x . style . display = 'none'
210
211
} ) ;
Original file line number Diff line number Diff line change 1
- < pre class ="graphviz ">
1
+ < pre class ="graphviz "{{ if (ne "" (.Get "engine")) }} engine=" {{(.Get " engine ")}}"{{ end }} >
2
2
{{ .Inner | htmlEscape | safeHTML }}
3
3
</ pre >
4
4
{{ .Page.Store.Set "hasGraphviz" true }}
You can’t perform that action at this time.
0 commit comments