diff options
author | Bjørn Erik Pedersen <[email protected]> | 2022-02-27 18:28:35 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-02-27 19:51:40 +0100 |
commit | fd0c1a5e9b59954c3a09bbff45306272d5c229df (patch) | |
tree | 4fbc0afb607f20999fa85b973beed6a2b8a620c5 /tpl | |
parent | 3ad39001df84c01a5da8ec7e008ee3835e1a7c4e (diff) | |
download | hugo-fd0c1a5e9b59954c3a09bbff45306272d5c229df.tar.gz hugo-fd0c1a5e9b59954c3a09bbff45306272d5c229df.zip |
tpl/diagrams: Rename the SVG accessor to Wrapped
Not perfect, but it gets it in line with the other .Inner/.Wrapped combos.
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/diagrams/diagrams.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tpl/diagrams/diagrams.go b/tpl/diagrams/diagrams.go index b0ddf5a42..60ebfb902 100644 --- a/tpl/diagrams/diagrams.go +++ b/tpl/diagrams/diagrams.go @@ -25,13 +25,13 @@ import ( ) type SVGDiagram interface { + // Wrapped returns the diagram as an SVG, including the <svg> container. + Wrapped() template.HTML + // Inner returns the inner markup of the SVG. // This allows for the <svg> container to be created manually. Inner() template.HTML - // SVG returns the diagram as an SVG, including the <svg> container. - SVG() template.HTML - // Width returns the width of the SVG. Width() int @@ -47,7 +47,7 @@ func (d goatDiagram) Inner() template.HTML { return template.HTML(d.d.Body) } -func (d goatDiagram) SVG() template.HTML { +func (d goatDiagram) Wrapped() template.HTML { return template.HTML(d.d.String()) } |