From 1eeb58712190d55020cec3ab63bc04e005de4182 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 18 Apr 2021 16:05:54 +0800 Subject: [PATCH] Take NormalEOF back --- modules/markup/markdown/markdown.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/markup/markdown/markdown.go b/modules/markup/markdown/markdown.go index c5426578c821..87fae2a23b2f 100644 --- a/modules/markup/markdown/markdown.go +++ b/modules/markup/markdown/markdown.go @@ -16,6 +16,7 @@ import ( "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/common" "code.gitea.io/gitea/modules/setting" + giteautil "code.gitea.io/gitea/modules/util" chromahtml "github.com/alecthomas/chroma/formatters/html" "github.com/yuin/goldmark" @@ -191,7 +192,7 @@ func actualRender(ctx *markup.RenderContext, input io.Reader, output io.Writer) log.Error("Unable to ReadAll: %v", err) return } - if err := converter.Convert(buf, lw, parser.WithContext(pc)); err != nil { + if err := converter.Convert(giteautil.NormalizeEOL(buf), lw, parser.WithContext(pc)); err != nil { log.Error("Unable to render: %v", err) _ = lw.CloseWithError(err) return