Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
khaitruong922 committed Jul 14, 2024
1 parent baaad1d commit 1ca2103
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ext/js/language/ja/japanese.js
Original file line number Diff line number Diff line change
Expand Up @@ -756,14 +756,16 @@ export function collapseEmphaticSequences(text, fullCollapse) {
--right;
}
// Whole string is emphatic
if (left > right) return text;
if (left > right) {
return text;
}

const leadingEmphatics = text.substring(0, left);
const trailingEmphatics = text.substring(right + 1);
let middle = '';
let currentCollapsedCodePoint = -1;

for (let i = left ; i <= right; ++i) {
for (let i = left; i <= right; ++i) {
const char = text[i];
const codePoint = char.codePointAt(0) ?? -1;
if (isEmphaticCodePoint(codePoint)) {
Expand Down

0 comments on commit 1ca2103

Please sign in to comment.