forked from devsam/core
fix: 초성 오토마타에서 head가 제때 정리되지 않는 버그
This commit is contained in:
@@ -76,12 +76,14 @@ function automata초성(text: string, convList: Record<string, Record<string, st
|
||||
result.push(head);
|
||||
if(!(ch in convList)){
|
||||
result.push(ch);
|
||||
head = undefined;
|
||||
continue;
|
||||
}
|
||||
head = ch;
|
||||
}
|
||||
if(head !== undefined){
|
||||
result.push(head);
|
||||
head = undefined;
|
||||
}
|
||||
return result.join('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user