aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/csv/csv.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/csv/csv.go')
-rw-r--r--modules/markup/csv/csv.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/markup/csv/csv.go b/modules/markup/csv/csv.go
index 7af34a6cbc..12458e954a 100644
--- a/modules/markup/csv/csv.go
+++ b/modules/markup/csv/csv.go
@@ -93,8 +93,10 @@ func (Renderer) Render(ctx *markup.RenderContext, input io.Reader, output io.Wri
if _, err := tmpBlock.WriteString(html.EscapeString(string(rawBytes))); err != nil {
return err
}
- _, err = tmpBlock.WriteString("</pre>")
- return err
+ if _, err := tmpBlock.WriteString("</pre>"); err != nil {
+ return err
+ }
+ return tmpBlock.Flush()
}
rd, err := csv.CreateReaderAndDetermineDelimiter(ctx, bytes.NewReader(rawBytes))