Skip to content

Conversation

@veerababu1729
Copy link

Issue :
Search functionality is ignoring spaces after dot or full stop.
Ex : on ctrl+f, I searched "exits.if" -> "exits. if" is shown

What I fixed :

  • Removed optional spaces around punctuation marks in search regex
  • Ensures exact matching for both dots and spaces, other existing functionalities are uniterrupted.
  • Fixes issue [Bug]: Searching (CTRL+F) does not respect spaces, and shows incorrect results #20225 where searching for '..' would incorrectly match '. ...'
  • Before if "hello.world" is searched, then "hello. world" is also shown. After my code update, search does not ignore spaces(" ") after dot (".")
  • Add test cases to prevent regression.

Resolves: #20225

Testing

  • Verified search works correctly with various punctuation patterns
  • Added unit tests to prevent regression
  • Tested with different spacing scenarios

Before :
Screenshot 2025-10-22 164411
After:
Screenshot 2025-10-22 172608
Screenshot 2025-10-22 172649

- Remove optional spaces around punctuation marks in search regex
- Fixes issue #20225 where searching for '..' would incorrectly match '. ...'
- Add test cases to prevent regression
- Ensures exact matching for punctuation sequences and text with dots

Resolves: #20225
@veerababu1729
Copy link
Author

Requesting to review as soon as possible. Since already tested practically (screenshots were attached)

@calixteman
Copy link
Contributor

Sorry but it's expected to work this way because it works like this in Acrobat:
image
And about #20225, there is already this PR #20364...
That said if you absolutely want to do a contribution, you can check if your change is breaking the unit tests (you can run them with npx gulp unittest or npx gulp unittestcli) and if all the tests pass then it means that we don't have a test testing this feature, I mean testing foo.bar matching foo. bar.

@calixteman calixteman closed this Oct 22, 2025
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.

[Bug]: Searching (CTRL+F) does not respect spaces, and shows incorrect results

2 participants