a36c86c90c4e3e807d75767cd9dad65379955f9f
--exclude-selectors marked a match as "ignored", the same as a bare data-pagefind-ignore, so metadata and filters inside the match were still collected. Excluding img.emoji, for example, still let the emoji become the page's auto-detected image. The status was also applied after the element had been processed. For a void element such as <img> that is too late twice over: its metadata has already been read, and the parser has already popped back to the parent, so the status landed on the parent instead and wiped out the rest of the page. Match the selectors in a handler registered ahead of the main element handler, which now reads that flag and gives the node Excluded status up front. The built-in REMOVE_SELECTORS (head, nav, footer, ...) keep the old Ignored status, so metadata tagged inside them still counts. Fixes #692
Description
My contributions to Pagefind/pagefind: 10 commits, 1 merged PRs
146 KiB
0 Stars
1 Watchers
0 Forks
Languages
Rust
62.4%
TypeScript
17.3%
Python
8%
Svelte
6.9%
JavaScript
5.4%