Skip to content

Commit

Permalink
do not ignore invisible text, maybe it included inside section
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustem Mussabekov committed Jun 30, 2024
1 parent 947cf6b commit db3ba7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/marker/find-text-ranges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export default function(texts: string[]) {
//skip blacklisted tags
node =>
(
blacklistedTags.includes((node.parentNode as HTMLElement)?.tagName) ||
(node.parentNode as HTMLElement)?.contentEditable == 'true' ||
!(node.parentNode as HTMLElement)?.checkVisibility()
blacklistedTags.includes((node.parentNode as HTMLElement)?.tagName)
|| (node.parentNode as HTMLElement)?.contentEditable == 'true'
// || !(node.parentNode as HTMLElement)?.checkVisibility() //ignore visiblity, maybe it inside section
) ?
NodeFilter.FILTER_REJECT :
NodeFilter.FILTER_ACCEPT
Expand Down

0 comments on commit db3ba7e

Please sign in to comment.