vimmatic
vimmatic copied to clipboard
Search doesn't ignore newlines
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
- Open page https://www.kernel.org/doc/html/next/process/coding-style.html
- Press key /
- Type
fix your
, hit enter - The extension says
Pattern not found: fix your
- Press / and type
should fix
, hit enter - Result is highlighted correctly
- Press / and type
your program
, hit enter - Result is highlighted correctly
Environment
- OS: Debian Sid
- Browser: Firefox
- Vimmatic version: 0.7.1