fix(localSearch): parse headings with non-anchor a tags as titles properly

pull/4809/head
Lee Dogeon 3 months ago
parent ba9f50f829
commit 29f568ba9c
No known key found for this signature in database
GPG Key ID: A6FBB8C59908DE9D

@ -212,7 +212,7 @@ export async function localSearchPlugin(
}
const headingRegex = /<h(\d*).*?>(.*?<a.*? href="#.*?".*?>.*?<\/a>)<\/h\1>/gi
const headingContentRegex = /(.*?)<a.*? href="#(.*?)".*?>.*?<\/a>/i
const headingContentRegex = /(.*)<a.*? href="#(.*?)".*?>.*?<\/a>/i
/**
* Splits HTML into sections based on headings

Loading…
Cancel
Save