pull/36124/head
wxiaoguang 2025-12-10 17:10:27 +07:00
parent 50b6d4e93f
commit e931e6cf95
1 changed files with 1 additions and 3 deletions

@ -55,9 +55,7 @@ func isAlphanumeric(b byte) bool {
}
func isInMarkdownLinkText(block text.Reader, lineAfter []byte) bool {
src := block.Source()
_, pos := block.Position()
return pos.Start-1 >= 0 && src[pos.Start-1] == '[' && bytes.HasPrefix(lineAfter, []byte("]("))
return block.PrecendingCharacter() == '[' && bytes.HasPrefix(lineAfter, []byte("]("))
}
// Parse parses the current line and returns a result of parsing.