vimmatic icon indicating copy to clipboard operation
vimmatic copied to clipboard

Search doesn't ignore newlines

Open physixcat opened this issue 8 months ago • 0 comments

The issue is already reported or known issue?

  • [X] I have searched the existing issues on github
  • [X] I am using the latest version

Current behavior

When visiting this site , I noticed that using / to search for the string "fix your" comes up with zero results. Same problem if any string contains this substring (ie "should fix your"). However, if you search for "should fix" or "your program", those turn up.

I then looked at the source code for the page and noticed the problem: there are newlines in the html file here. "fix" happens to be at the end of a line, and "your" at the beginning of the next. That's why the search fails, because it doesn't ignore new lines. The same problem occurs when trying to search for "my views" (they are on separate lines in the source)

Expected behavior

Searching "fix your" or a string including it and the surrounding words should return a successful result in a search

Steps to reproduce

  1. Open page https://www.kernel.org/doc/html/next/process/coding-style.html
  2. Press key /
  3. Type fix your, hit enter
  4. The extension says Pattern not found: fix your
  5. Press / and type should fix, hit enter
  6. Result is highlighted correctly
  7. Press / and type your program, hit enter
  8. Result is highlighted correctly

Environment

  • OS: Debian Sid
  • Browser: Firefox
  • Vimmatic version: 0.7.1

physixcat avatar Jun 11 '24 15:06 physixcat