1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-09 03:57:19 +00:00

Refactor markup render system (#32645)

This PR mainly removes some global variables, moves some code and
renames some functions to make code clearer.

This PR also removes a testing-only option ForceHardLineBreak during
refactoring since the behavior is clear now.
This commit is contained in:
wxiaoguang
2024-11-27 00:46:02 +08:00
committed by GitHub
parent 87bb5ed0bc
commit b6ce2d6dc9
7 changed files with 188 additions and 225 deletions

View File

@ -27,6 +27,6 @@ func FuzzMarkdownRenderRaw(f *testing.F) {
func FuzzMarkupPostProcess(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
setting.AppURL = "http://localhost:3000/"
markup.PostProcess(newFuzzRenderContext(), bytes.NewReader(data), io.Discard)
markup.PostProcessDefault(newFuzzRenderContext(), bytes.NewReader(data), io.Discard)
})
}