Skip to content

Commit

Permalink
Fix incorrect rendering csv file when file size is larger than UI.CSV…
Browse files Browse the repository at this point in the history
….MaxFileSize (#29653) (#29663)

Backport #29653 by @yp05327

Fix #29506

Co-authored-by: yp05327 <[email protected]>
  • Loading branch information
GiteaBot and yp05327 authored Mar 8, 2024
1 parent 76b6754 commit 6651d2d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/markup/csv/csv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 6651d2d

Please sign in to comment.