Skip to content

Commit

Permalink
fix: support multi-lang source feed lookup (miraclx#574)
Browse files Browse the repository at this point in the history
* support multi-lang source feed lookup

* merge replacements
  • Loading branch information
miraclx authored Sep 12, 2023
1 parent 0855665 commit 3861d07
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 22 deletions.
13 changes: 1 addition & 12 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
"spotify-uri": "^4.0.0",
"stringd": "^2.2.0",
"stringd-colors": "^1.10.0",
"stripchar": "^1.2.1",
"xbytes": "^1.8.0",
"xprogress": "^0.20.0",
"youtube-dl-exec": "^2.4.0",
Expand Down
4 changes: 1 addition & 3 deletions src/text_utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {StripChar} from 'stripchar';

/**
* Stripout invalid characters, symbols and unnecessary spaces
*
Expand All @@ -25,7 +23,7 @@ function stripText(data) {
...new Set(
data.reduce(
(all, text) =>
(text = StripChar.RSspecChar(text.normalize('NFD').replace(/\p{Diacritic}/gu, '')))
(text = text.normalize('NFD').replace(/\p{Diacritic}|[^\p{Letter} \p{Number}]/gu, ''))
? all.concat([text.replace(/\s{2,}/g, ' ').toLowerCase()])
: all,
[],
Expand Down
7 changes: 1 addition & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,7 @@ [email protected], node-fzf@~0.5.1:
resolved "https://registry.npmjs.org/node-fzf/-/node-fzf-0.11.0.tgz"
integrity sha512-djlXFlrGSrGCHVHOr4iPRkfPuZXac6Elv0wBtKEJ383Dd/rj+9zaCu4JDZQVSGvoDRRSfJYL4roK9SLjTxeOIg==
dependencies:
cli-color "~2.0.0"
cli-color "~1.2.0"
keypress "~0.2.1"
minimist "~1.2.5"
redstar "0.0.2"
Expand Down Expand Up @@ -2564,11 +2564,6 @@ strip-json-comments@^3.1.1:
resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==

stripchar@^1.2.1:
version "1.2.1"
resolved "https://registry.npmjs.org/stripchar/-/stripchar-1.2.1.tgz"
integrity sha1-bpPDT14C/RGwo/UuQnqWrwbzmUc=

strtok3@^7.0.0:
version "7.0.0"
resolved "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz"
Expand Down

0 comments on commit 3861d07

Please sign in to comment.