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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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