Merge pull request #2668 from ehuss/dont-mark-svg

Ignore SVG text elements in search highlighting
This commit is contained in:
Eric Huss 2025-04-17 14:53:16 +00:00 committed by GitHub
commit 36e5525ea5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,7 +29,8 @@ window.search = window.search || {};
searchicon = document.getElementById('search-toggle'),
content = document.getElementById('content'),
mark_exclude = [],
// SVG text elements don't render if inside a <mark> tag.
mark_exclude = ["text"],
marker = new Mark(content),
URL_SEARCH_PARAM = 'search',
URL_MARK_PARAM = 'highlight',