mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 01:57:20 +00:00
Fix issue title rendering and refactor legacy function names (#32703)
Fix #32700, regression of recent markup refactoring And by the way, clarify many legacy problems: 1. Some "RenderXxx" functions do not really "render", they only call "post processors" 2. Merge "RenderEmoji | RenderCodeBlock", they are all for "simple issue title"
This commit is contained in:
@ -57,6 +57,9 @@ type RenderOptions struct {
|
||||
type RenderContext struct {
|
||||
ctx context.Context
|
||||
|
||||
// the context might be used by the "render" function, but it might also be used by "postProcess" function
|
||||
usedByRender bool
|
||||
|
||||
SidebarTocNode ast.Node
|
||||
|
||||
RenderHelper RenderHelper
|
||||
@ -182,6 +185,7 @@ func pipes() (io.ReadCloser, io.WriteCloser, func()) {
|
||||
}
|
||||
|
||||
func render(ctx *RenderContext, renderer Renderer, input io.Reader, output io.Writer) error {
|
||||
ctx.usedByRender = true
|
||||
if ctx.RenderHelper != nil {
|
||||
defer ctx.RenderHelper.CleanUp()
|
||||
}
|
||||
|
Reference in New Issue
Block a user