summaryrefslogtreecommitdiff
path: root/src/render/methods.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/methods.go')
-rw-r--r--src/render/methods.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/render/methods.go b/src/render/methods.go
index a671f7e..a28f6b5 100644
--- a/src/render/methods.go
+++ b/src/render/methods.go
@@ -194,11 +194,7 @@ func (m *Methods) GetPostSeriesNextPrevious(
type preprocessPostPayload struct {
RootURL URLBuilder
- image func(args ...string) (string, error)
-}
-
-func (p preprocessPostPayload) Image(args ...string) (string, error) {
- return p.image(args...)
+ post.PreprocessFunctions
}
// preprocessPostBody interprets the Post's Body as a text template which may
@@ -213,8 +209,7 @@ func (m *Methods) preprocessPostBody(into io.Writer, p post.Post) error {
}
err = tpl.Execute(into, preprocessPostPayload{
- RootURL: m.RootURL(),
- image: m.preprocessFuncs.Image,
+ m.RootURL(), m.preprocessFuncs,
})
if err != nil {
return fmt.Errorf("executing post body as template: %w", err)