Skip to content

Commit

Permalink
Prepare release v1.9.1 (#101)
Browse files Browse the repository at this point in the history
* Preparing v1.9.1 release

* Fix fuzzy search breaking when highlight string is shorter

---------

Co-authored-by: Simon Heimler <mail@simon-heimler.de>
  • Loading branch information
Fannon and Simon Heimler authored May 29, 2023
1 parent ca6b4e2 commit 953cd3c
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 68 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

## [unreleased]

## [v1.8.8]
## [v1.9.1]

- **IMPROVED**: Better handling of long bookmark titles. Some titles are now abbreviated, especially if they are a subpart of the URL anyway.

## [v1.9.0]

- **FIXED**: Fuzzy search now also works with non-ASCII characters like CKJ chars by default
- **FIXED**: Option `bookmarkColor` now also applies to the bookmark folder badge in the search results
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Browser extension to (fuzzy) search and navigate bookmarks, history and open tabs.",
"homepage_url": "https://github.com/Fannon/search-bookmarks-history-and-tabs",
"author": "Simon Heimler",
"version": "1.9.0",
"version": "1.9.1",
"manifest_version": 3,
"permissions": ["tabs", "bookmarks", "history", "storage"],
"action": {
Expand Down
96 changes: 41 additions & 55 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "search-bookmarks-history-and-tabs",
"version": "1.9.0",
"version": "1.9.1",
"description": "Browser extension to (fuzzy) search and navigate bookmarks, history and open tabs.",
"main": "index.js",
"dependencies": {
"@leeoniya/ufuzzy": "^1.0.6",
"@leeoniya/ufuzzy": "^1.0.7",
"@yaireo/tagify": "^4.17.8",
"bulma": "^0.9.4",
"js-yaml": "^4.1.0",
"mark.js": "^8.11.1"
},
"devDependencies": {
"cypress": "^12.12.0",
"cypress": "^12.13.0",
"cypress-fail-on-console-error": "^4.0.3",
"eslint": "^8.40.0",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-cypress": "^2.13.3",
"live-server": "^1.2.2",
Expand Down
9 changes: 2 additions & 7 deletions popup/js/search/fuzzySearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ function fuzzySearchWithScoring(searchTerm, searchMode) {
return [] // early return
}

// eslint-disable-next-line no-control-regex
console.log('nonAsciiCharacters', containsNonASCII(searchTerm))

if (containsNonASCII(searchTerm)) {
state[searchMode] = undefined
}
Expand All @@ -67,8 +64,6 @@ function fuzzySearchWithScoring(searchTerm, searchMode) {
options.interSplit = '(p{Unified_Ideograph=yes})+'
}

console.log(options)

// When searchFuzzyness is set to 0.8 or higher:
// allows for a single error in each term of the search phrase
// @see https://github.com/leeoniya/uFuzzy#how-it-works
Expand Down Expand Up @@ -112,10 +107,10 @@ function fuzzySearchWithScoring(searchTerm, searchMode) {
const highlight = uFuzzy.highlight(result.searchString, info.ranges[i])
// Split highlighted string back into its original multiple properties
const highlightArray = highlight.split('¦')
if (highlightArray[0].includes('<mark>')) {
if (highlightArray[0] && highlightArray[0].includes('<mark>')) {
result.titleHighlighted = highlightArray[0]
}
if (highlightArray[1].includes('<mark>')) {
if (highlightArray[1] && highlightArray[1].includes('<mark>')) {
result.urlHighlighted = highlightArray[1]
}
if (highlightArray[2] && highlightArray[2].includes('<mark>')) {
Expand Down

0 comments on commit 953cd3c

Please sign in to comment.