Skip to content

Commit

Permalink
refactor: 분해된 자모를 나타내는 변수를 복수형으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-moon committed Apr 19, 2024
1 parent daefd1e commit dfdc14e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/_internal/hangul.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ export function binaryAssembleHangulCharacters(source: string, nextCharacter: st
`Invalid next character: ${nextCharacter}. Next character must be one of the chosung, jungsung, or jongsung.`
);

const sourceJamo = disassembleHangulToGroups(source)[0];
const sourceJamos = disassembleHangulToGroups(source)[0];

const isSingleCharacter = sourceJamo.length === 1;
const isSingleCharacter = sourceJamos.length === 1;
if (isSingleCharacter) {
const sourceCharacter = sourceJamo[0];
const sourceCharacter = sourceJamos[0];
return binaryAssembleHangulAlphabets(sourceCharacter, nextCharacter);
}

const [restJamos, lastJamo] = excludeLastElement(sourceJamo);
const [restJamos, lastJamo] = excludeLastElement(sourceJamos);

const needLinking = canBeChosung(lastJamo) && canBeJungsung(nextCharacter);
if (needLinking) {
Expand Down

0 comments on commit dfdc14e

Please sign in to comment.