Fix and refactor markdown rendering (#32522)
(cherry picked from commit 5eebe1dc5fb29a162c51d050396fce7b14e47f4e)
Conflicts:
models/repo/repo.go
models/repo/repo_test.go
modules/markup/html.go
modules/markup/html_commit.go
modules/markup/html_email.go
modules/markup/html_emoji.go
modules/markup/html_internal_test.go
modules/markup/html_issue.go
modules/markup/html_link.go
modules/markup/html_node.go
modules/markup/html_test.go
modules/markup/markdown/goldmark.go
modules/markup/markdown/markdown_test.go
modules/markup/markdown/transform_image.go
modules/markup/orgmode/orgmode.go
modules/markup/orgmode/orgmode_test.go
modules/markup/render.go
modules/markup/render_links.go
modules/templates/util_render.go
modules/templates/util_render_test.go
routers/common/markup.go
routers/web/feed/convert.go
routers/web/repo/wiki.go
but a few lines survived and are useful