[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim 1268f095c3: Fix pyim-dhashcache--get-ishortcodes-i
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim 1268f095c3: Fix pyim-dhashcache--get-ishortcodes-ishortcodes when deal with 'bu--zhi' |
Date: |
Sat, 14 Jan 2023 01:58:02 -0500 (EST) |
branch: externals/pyim
commit 1268f095c38121654d42ea20f82b1d15d23347e9
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
Fix pyim-dhashcache--get-ishortcodes-ishortcodes when deal with 'bu--zhi'
---
pyim-dhashcache.el | 2 +-
tests/pyim-tests.el | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/pyim-dhashcache.el b/pyim-dhashcache.el
index cb5b3f3b0a..7f4b463bba 100644
--- a/pyim-dhashcache.el
+++ b/pyim-dhashcache.el
@@ -204,7 +204,7 @@
(list (mapconcat
(lambda (x)
(substring x 0 1))
- (split-string code "-") "-"))))
+ (remove "" (split-string code "-")) "-"))))
;; ** 从 dhashcache 删除词条相关函数
(cl-defmethod pyim-dcache-delete-word
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 8ba7446dd8..5718bb80b9 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -1257,6 +1257,8 @@ wo-hao 我好
(should (equal (pyim-dhashcache--get-ishortcodes-shortcodes "") nil)))
(ert-deftest pyim-tests-pyim-dhashcache--get-ishortcodes-ishortcodes ()
+ (should (equal (pyim-dhashcache--get-ishortcodes-ishortcodes "ni--hao--")
'("n-h")))
+ (should (equal (pyim-dhashcache--get-ishortcodes-ishortcodes "ni--hao")
'("n-h")))
(should (equal (pyim-dhashcache--get-ishortcodes-ishortcodes "ni-hao")
'("n-h")))
(should (equal (pyim-dhashcache--get-ishortcodes-ishortcodes "wubi/aaaa")
nil))
(should (equal (pyim-dhashcache--get-ishortcodes-ishortcodes "ni") '("n")))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/pyim 1268f095c3: Fix pyim-dhashcache--get-ishortcodes-ishortcodes when deal with 'bu--zhi',
ELPA Syncer <=