about summary refs log tree commit diff stats
path: root/internal/components
diff options
context:
space:
mode:
authorAlan Pearce2025-03-12 22:39:51 +0100
committerAlan Pearce2025-03-12 22:39:51 +0100
commit9015baf955c94a806c01b3dcd5648c8e68ad2685 (patch)
tree5f59386c2ab31b6e45b85576e45a1fc8ae448ae0 /internal/components
parent7bb77ff5729cc9434afee895a470fd3b4c12e6d1 (diff)
downloadsearchix-9015baf955c94a806c01b3dcd5648c8e68ad2685.tar.lz
searchix-9015baf955c94a806c01b3dcd5648c8e68ad2685.tar.zst
searchix-9015baf955c94a806c01b3dcd5648c8e68ad2685.zip
refactor: ensure errors have stack traces HEAD main
Diffstat (limited to 'internal/components')
-rw-r--r--internal/components/markdown.templ4
-rw-r--r--internal/components/page.templ2
2 files changed, 3 insertions, 3 deletions
diff --git a/internal/components/markdown.templ b/internal/components/markdown.templ
index ff1212f..0ce98ad 100644
--- a/internal/components/markdown.templ
+++ b/internal/components/markdown.templ
@@ -5,9 +5,9 @@ import (
 
 	"go.alanpearce.eu/searchix/internal/nix"
 
+	"context"
 	"github.com/yuin/goldmark"
 	"github.com/yuin/goldmark/extension"
-	"context"
 	"io"
 )
 
@@ -27,7 +27,7 @@ func firstSentence[T ~string](text T) T {
 }
 
 func markdown(text nix.Markdown) templ.Component {
-	return templ.ComponentFunc(func(ctx context.Context, w io.Writer) error {
+	return templ.ComponentFunc(func(ctx context.Context, w io.Writer) errors.E {
 		err := md.Convert([]byte(text), w)
 
 		return err
diff --git a/internal/components/page.templ b/internal/components/page.templ
index 4ba3741..63d0439 100644
--- a/internal/components/page.templ
+++ b/internal/components/page.templ
@@ -81,7 +81,7 @@ templ script(s *frontend.Asset) {
 }
 
 func Unsafe(html string) templ.Component {
-	return templ.ComponentFunc(func(_ context.Context, w io.Writer) (err error) {
+	return templ.ComponentFunc(func(_ context.Context, w io.Writer) (err errors.E) {
 		_, err = io.WriteString(w, html)
 		return
 	})