fix(local-search): parse headings with non-anchor `a` tags as titles properly (#4809)

pull/4813/head
Lee Dogeon 2 months ago committed by Divyansh Singh
parent 7619521259
commit 53599039a0

@ -211,7 +211,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