fix node stop

This commit is contained in:
wxiaoguang 2024-05-02 18:24:39 +08:00
parent 067853f5b2
commit 6c6fc38c2f
1 changed files with 2 additions and 1 deletions

View File

@ -592,7 +592,8 @@ func replaceContentList(node *html.Node, i, j int, newNodes []*html.Node) {
func mentionProcessor(ctx *RenderContext, node *html.Node) {
start := 0
for node != nil {
nodeStop := node.NextSibling
for node != nodeStop {
found, loc := references.FindFirstMentionBytes(util.UnsafeStringToBytes(node.Data[start:]))
if !found {
node = node.NextSibling