mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-24 09:59:24 +02:00
Refactor markup render system (#32589)
This PR mainly moves some code and introduces `RenderContext.WithXxx` functions
This commit is contained in:
1 parent
81ac8d914c
commit
c4e27cb27b
49 files changed
+486
-626
No files matched your search
@@ -79,7 +79,7 @@ func (g *ASTTransformer) Transform(node *ast.Document, reader text.Reader, pc pa
|
||||
// TODO: this was a quite unclear part, old code: `if metas["mode"] != "document" { use comment link break setting }`
|
||||
// many places render non-comment contents with no mode=document, then these contents also use comment's hard line break setting
|
||||
// especially in many tests.
|
||||
markdownLineBreakStyle := ctx.Metas["markdownLineBreakStyle"]
|
||||
markdownLineBreakStyle := ctx.RenderOptions.Metas["markdownLineBreakStyle"]
|
||||
if markup.RenderBehaviorForTesting.ForceHardLineBreak {
|
||||
v.SetHardLineBreak(true)
|
||||
} else if markdownLineBreakStyle == "comment" {
|
||||
|
||||
Reference in new issue
Block a user