Skip to content

Commit d638b7d

Browse files
authored
Merge pull request #169 from tokuhirom/issue-167
←→ などを入力できなくなっていた問題を修正 close #167
2 parents 3444b02 + c7ed384 commit d638b7d

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

libakaza/src/consonant.rs

+15-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,21 @@ impl ConsonantSuffixExtractor {
2020
/// "めny" を ("め", "ny") に分解する。
2121
// (preedit, suffix) の形で返す。
2222
pub fn extract(&self, src: &str) -> (String, String) {
23-
if src.ends_with("nn") {
23+
if
24+
// nn は「ん」で確定されている。
25+
src.ends_with("nn")
26+
// 矢印などはのこった子音じゃない。
27+
|| src.ends_with("zh")
28+
|| src.ends_with("zj")
29+
|| src.ends_with("zk")
30+
|| src.ends_with("zl")
31+
|| src.ends_with("z[")
32+
|| src.ends_with("z]")
33+
|| src.ends_with("z-")
34+
|| src.ends_with("z.")
35+
|| src.ends_with("z,")
36+
|| src.ends_with("z/")
37+
{
2438
(src.to_string(), "".to_string())
2539
} else if let Some(p) = self.pattern.captures(src) {
2640
(

0 commit comments

Comments
 (0)