File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -288,15 +288,14 @@ multi write-type-source($doc) {
288
288
}
289
289
290
290
if $ type {
291
- my $ tg-preamble = qq [ <h1>Type graph</h1> \n <p>Below you should see a
292
- clickable image showing the type relations for $ podname that links
293
- to the documentation pages for the related types. If not, try the
294
- <a href=" /images/type-graph-{ href_escape $ podname } .png">PNG
295
- version</a> instead.</p> ] ;
291
+ my $ graph-contents = slurp ' template/type-graph.html ' ;
292
+ $ graph-contents .= subst ( ' ESCAPEDPODNAME ' , uri_escape( $ podname ), : g);
293
+ $ graph-contents .= subst ( ' PODNAME ' , $ podname );
294
+ $ graph-contents .= subst ( ' INLINESVG ' , svg-for-file( " html /images/type-graph-$ podname.svg " ));
295
+
296
296
$ pod . contents. append : Pod ::Raw. new (
297
297
target => ' html' ,
298
- contents => $ tg-preamble ~ svg-for-file(" html/images/type-graph-$ podname .svg" ),
299
-
298
+ contents => $ graph-contents ,
300
299
);
301
300
302
301
my @ mro = $ type . mro;
Original file line number Diff line number Diff line change
1
+ < h1 > Type graph</ h1 >
2
+ < figure >
3
+ < figcaption > Type relations for < code > PODNAME</ code > </ figcaption >
4
+ INLINESVG
5
+ < p class ="fallback ">
6
+ Stand-alone image:
7
+ < a rel ="alternate " href ="/images/type-graph-ESCAPEDPODNAME.svg " type ="image/svg+xml "> vector</ a > ,
8
+ < a rel ="alternate " href ="/images/type-graph-ESCAPEDPODNAME.png " type ="image/png "> raster</ a >
9
+ </ p >
10
+ </ figure >
You can’t perform that action at this time.
0 commit comments