fix: wrong impl

This commit is contained in:
Miwa / Ensan
2025-06-29 22:01:28 +09:00
parent e329bbddd5
commit 5356567ca7

View File

@ -116,9 +116,6 @@ struct TypoCorrectionGenerator: Sendable {
for element in $0.inputElements {
ComposingText.updateConvertTargetElements(currentElements: &convertTargetElements, newElement: element)
}
if Self.shouldBeRemovedForDicdataStore(components: convertTargetElements) {
return nil
}
return (
convertTargetElements: convertTargetElements,
lastElement: $0.inputElements.last!,
@ -135,14 +132,6 @@ struct TypoCorrectionGenerator: Sendable {
return nil
}
fileprivate static func shouldBeRemovedForDicdataStore(components: [ComposingText.ConvertTargetElement]) -> Bool {
// 使1
guard let first = components.first?.string.first?.toKatakana() else {
return false
}
return !CharacterUtils.isRomanLetter(first)
}
fileprivate static func getTypo(_ elements: some Collection<ComposingText.InputElement>, frozen: Bool = false) -> [TypoCandidate] {
let key = elements.reduce(into: "") {$0.append($1.character.toKatakana())}