diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-02-27 13:31:55 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-02-27 17:59:36 +0100 |
commit | f7109771a038e0237350dcfbe20f1036e9c8a46b (patch) | |
tree | c9eed611c56a8969509e40bc2db27d4e5e77d4ef /markup/goldmark | |
parent | e1f696911ebbf870f9b6b814421dc880945a6b9a (diff) |
CodeblockContext method renames
Fixes #9577
Diffstat (limited to 'markup/goldmark')
-rw-r--r-- | markup/goldmark/codeblocks/integration_test.go | 8 | ||||
-rw-r--r-- | markup/goldmark/codeblocks/render.go | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/markup/goldmark/codeblocks/integration_test.go b/markup/goldmark/codeblocks/integration_test.go index 001deb9f8..fcd406c2c 100644 --- a/markup/goldmark/codeblocks/integration_test.go +++ b/markup/goldmark/codeblocks/integration_test.go @@ -40,12 +40,12 @@ func TestCodeblocks(t *testing.T) { style = 'monokai' tabWidth = 4 -- layouts/_default/_markup/render-codeblock-goat.html -- -{{ $diagram := diagrams.Goat .Code }} +{{ $diagram := diagrams.Goat .Inner }} Goat SVG:{{ substr $diagram.SVG 0 100 | safeHTML }} }}| Goat Attribute: {{ .Attributes.width}}| -- layouts/_default/_markup/render-codeblock-go.html -- -Go Code: {{ .Code | safeHTML }}| -Go Language: {{ .Lang }}| +Go Code: {{ .Inner | safeHTML }}| +Go Language: {{ .Type }}| -- layouts/_default/single.html -- {{ .Content }} -- content/p1.md -- @@ -129,7 +129,7 @@ echo "p1"; -- layouts/_default/single.html -- {{ .Content }} -- layouts/_default/_markup/render-codeblock.html -- -|{{ .Code | safeHTML }}| +|{{ .Inner | safeHTML }}| ` diff --git a/markup/goldmark/codeblocks/render.go b/markup/goldmark/codeblocks/render.go index 27252fc27..97604eb55 100644 --- a/markup/goldmark/codeblocks/render.go +++ b/markup/goldmark/codeblocks/render.go @@ -150,11 +150,11 @@ func (c *codeBlockContext) Page() interface{} { return c.page } -func (c *codeBlockContext) Lang() string { +func (c *codeBlockContext) Type() string { return c.lang } -func (c *codeBlockContext) Code() string { +func (c *codeBlockContext) Inner() string { return c.code } |