Skip to content

Commit

Permalink
Merge pull request #169 from tokuhirom/issue-167
Browse files Browse the repository at this point in the history
←→ などを入力できなくなっていた問題を修正 close #167
  • Loading branch information
tokuhirom authored Jan 17, 2023
2 parents 3444b02 + c7ed384 commit d638b7d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion libakaza/src/consonant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,21 @@ impl ConsonantSuffixExtractor {
/// "めny" を ("め", "ny") に分解する。
// (preedit, suffix) の形で返す。
pub fn extract(&self, src: &str) -> (String, String) {
if src.ends_with("nn") {
if
// nn は「ん」で確定されている。
src.ends_with("nn")
// 矢印などはのこった子音じゃない。
|| src.ends_with("zh")
|| src.ends_with("zj")
|| src.ends_with("zk")
|| src.ends_with("zl")
|| src.ends_with("z[")
|| src.ends_with("z]")
|| src.ends_with("z-")
|| src.ends_with("z.")
|| src.ends_with("z,")
|| src.ends_with("z/")
{
(src.to_string(), "".to_string())
} else if let Some(p) = self.pattern.captures(src) {
(
Expand Down

0 comments on commit d638b7d

Please sign in to comment.