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