Skip to content

Commit

Permalink
Minor polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
wtetsu committed Dec 28, 2024
1 parent 406f539 commit b576e90
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 0 additions & 3 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
"noExplicitAny": "off",
"noArrayIndexKey": "off"
},
"complexity": {
"useRegexLiterals": "off"
},
"performance": {
"noDelete": "off"
}
Expand Down
6 changes: 2 additions & 4 deletions src/main/core/entry/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import UniqList from "uniqlist";
import text from "../../lib/text";
import rule from "../rule";

const RE_UNNECESSARY_CHARACTERS = new RegExp(String.fromCharCode(0x200c), "g");
const RE_SLASH = new RegExp("/", "g");

const createLookupWordsEn = (rawSourceStr, withCapitalized = false, mustIncludeOriginalText = false) => {
const replacedSourceStr = rawSourceStr.replace(RE_UNNECESSARY_CHARACTERS, "").replace(RE_SLASH, " / ");
// U+200C: zero width non-joiner
const replacedSourceStr = rawSourceStr.replaceAll("\u200c", "").replaceALl("/", " / ");
const sourceStr = text.dealWithHyphens(replacedSourceStr, rule.doLetters);

const { firstWords, linkedWords } = processSourceString(sourceStr);
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2022",
"target": "es2024",
"jsx": "react-jsx",
"moduleResolution": "node",
"strict": true,
Expand Down

0 comments on commit b576e90

Please sign in to comment.