philc / philc/vimium

interpreting span when using regexp

Open
#4,372 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
27k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

When using Vimium to search for text patterns that span across multiple span elements on a webpage using regular expressions, the search fails to match the expected text.

Steps to reproduce the behavior:

  1. Go to URL 'https://stackoverflow.com/questions/4182554/html-css-font-color-vs-span-style'
  2. Activate Vimium's search feature (by pressing /).
  3. Type the regular expression \11.5k.*4 (or another similar pattern that aims to grep parts divided by span).
  4. Observe that the search does not match the expected pattern in the text which is visually continuous but structured within separate span elements.
  5. The regular expression search should match patterns that span across multiple span elements, recognizing and highlighting the entire pattern.
  • Chrome 119.0.6045.160 (Official Build) (64-bit), JavaScript | V8 11.9.169.6
  • Vimium 2.0.5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Vimium's search feature and reproduce the issue on the linked Stack Overflow URL using the stated regular expression. Inspect how text divided across span elements is searched and highlighted; done means the pattern matches and highlights the full visually continuous text across those elements.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.