1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-05 10:07:22 +00:00

Fix markdown URL parsing for commit ID (#30812)

This commit is contained in:
wxiaoguang
2024-05-04 09:48:16 +08:00
committed by GitHub
parent 0f3e717a1a
commit c7bb3aa034
4 changed files with 116 additions and 75 deletions

View File

@ -60,7 +60,8 @@ func renderCodeBlock(ctx *RenderContext, node *html.Node) (urlPosStart, urlPosSt
}
func codePreviewPatternProcessor(ctx *RenderContext, node *html.Node) {
for node != nil {
nodeStop := node.NextSibling
for node != nodeStop {
if node.Type != html.TextNode {
node = node.NextSibling
continue