Previously words in filenames that are seperated by dots or whitespaces could receive a lower score as string match in the path string. This can lead to a folder in the path being highlighted when searching, while not highlighting the matching filename.
For example in "App/my.App.js" the App-folder would be highlighted, but not the filename, when querying for "App".
This CL approaches this by adding checks for both dots and whitespaces to the testWordStart function that is used to calculate the score.
To evaluate the results easier, unittests have been added.
Bug: 1084494
Change-Id: Ia7a0ea3ed7ed033bb6bd35eb00f2ae75a0046afe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2218016
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
The Chromium/Google style guides does not enforce curly braces for
single-line if-statements, but does strongly recommend doing so. Adding
braces will improve code readability, by visually separating code
blocks. This will also prevent issues where accidental additions are
pushed to the "else"-clause instead of in the if-block.
This CL also updates the presubmit `eslint` to run the fix with the
correct configuration. It will now fix all issues it can fix.
Change-Id: I4b616f21a99393f168dec743c0bcbdc7f5db04a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821526
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#701070}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7e0bdbe2d7f9fc2386bfaefda3cc29c66ccc18f9