summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/methods.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render/methods.go b/src/render/methods.go
index a28f6b5..2988d8f 100644
--- a/src/render/methods.go
+++ b/src/render/methods.go
@@ -200,7 +200,7 @@ type preprocessPostPayload struct {
// preprocessPostBody interprets the Post's Body as a text template which may
// use any of the functions found in PreprocessFunctions (all must be set). It
// executes the template and writes the result to the given writer.
-func (m *Methods) preprocessPostBody(into io.Writer, p post.Post) error {
+func (m *Methods) PreprocessPostBody(into io.Writer, p post.Post) error {
tpl := txttpl.New("")
tpl, err := tpl.Parse(p.Body)
@@ -221,7 +221,7 @@ func (m *Methods) preprocessPostBody(into io.Writer, p post.Post) error {
func (m *Methods) PostGemtextBody(p post.StoredPost) (string, error) {
buf := new(bytes.Buffer)
- if err := m.preprocessPostBody(buf, p.Post); err != nil {
+ if err := m.PreprocessPostBody(buf, p.Post); err != nil {
return "", fmt.Errorf("preprocessing post body: %w", err)
}
@@ -243,7 +243,7 @@ func (m *Methods) PostGemtextBody(p post.StoredPost) (string, error) {
func (m *Methods) PostHTMLBody(p post.StoredPost) (template.HTML, error) {
bodyBuf := new(bytes.Buffer)
- if err := m.preprocessPostBody(bodyBuf, p.Post); err != nil {
+ if err := m.PreprocessPostBody(bodyBuf, p.Post); err != nil {
return "", fmt.Errorf("preprocessing post body: %w", err)
}