refactor: return errors with stack traces, where appropriate
1 file changed, 3 insertions(+), 2 deletions(-)
changed files
M internal/markdown/markdown.go → internal/markdown/markdown.go
@@ -7,6 +7,7 @@ fences "github.com/stefanfritsch/goldmark-fences" "github.com/yuin/goldmark" "github.com/yuin/goldmark/extension" htmlrenderer "github.com/yuin/goldmark/renderer/html" + "gitlab.com/tozd/go/errors" ) var markdown = goldmark.New(@@ -21,6 +22,6 @@ &fences.Extender{}, ), ) -func Convert(content []byte, w io.Writer) error { - return markdown.Convert(content, w) +func Convert(content []byte, w io.Writer) errors.E { + return errors.WithStack(markdown.Convert(content, w)) }