diff --git a/postrender.go b/postrender.go index f5b5649..02b156b 100644 --- a/postrender.go +++ b/postrender.go @@ -258,5 +258,11 @@ func handleRenderMarkdown(app *App, w http.ResponseWriter, r *http.Request) erro return ErrBadJSON } - return impart.WriteSuccess(w, applyMarkdown([]byte(in.RawBody), in.BaseURL, app.cfg), http.StatusOK) + out := struct { + Body string `json:"body"` + }{ + Body: applyMarkdown([]byte(in.RawBody), in.BaseURL, app.cfg), + } + + return impart.WriteSuccess(w, out, http.StatusOK) }