Skip to content

fix: make sure the find do not skip CODE and PRE areas.#152

Merged
alecdotdev merged 1 commit into
alecdotdev:masterfrom
roniaxe:fix-find-in-text-bug
May 19, 2026
Merged

fix: make sure the find do not skip CODE and PRE areas.#152
alecdotdev merged 1 commit into
alecdotdev:masterfrom
roniaxe:fix-find-in-text-bug

Conversation

@roniaxe
Copy link
Copy Markdown

@roniaxe roniaxe commented May 16, 2026

The find did not find text in those area editors before, with this fix, it does.

The find did not find text in those area editors before, with this fix, it does.
Copilot AI review requested due to automatic review settings May 16, 2026 17:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes CODE and PRE from the list of skipped elements in the find bar's text walker, so that text inside code/pre blocks (including highlight.js-tokenized content) is now searchable. A clarifying comment is added explaining the rationale for which elements remain skipped.

Changes:

  • Allow find to traverse into <code> and <pre> elements.
  • Document why SCRIPT/STYLE/NOSCRIPT and find marks remain skipped.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alecdotdev alecdotdev merged commit 4df4ab6 into alecdotdev:master May 19, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants