[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/kiwix 6e85607 066/192: validate query is english or non
From: |
Stefan Monnier |
Subject: |
[elpa] externals/kiwix 6e85607 066/192: validate query is english or non-english. |
Date: |
Sat, 19 Dec 2020 00:41:34 -0500 (EST) |
branch: externals/kiwix
commit 6e856073c484af71c1e1cb6fbbe1e2225715bd5e
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>
validate query is english or non-english.
---
kiwix.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/kiwix.el b/kiwix.el
index fea0143..7480bdb 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -233,9 +233,15 @@ for query string and library interactively."
;; - query : should not exclude space
(when (string-match "\\(?:(\\(.*\\)):\\)?\\([^]\n\t\r]*\\)" link) ;
(library):query
(let* (
- ;; convert between libraries full name and abbrev.
- (library (kiwix-get-library-fullname (or (match-string 1 link)
- "default")))
+ (library (if (string-match-p "\\`[a-zA-Z\ ]+\\'"
+ ;; query
+ (match-string 2 link)) ; validate
query is English
+ ;; convert between libraries full name and abbrev.
+ (kiwix-get-library-fullname (or (match-string 1 link)
+ "default"))
+ ;; validate query is non-English
+ (kiwix-get-library-fullname "zh")
+ ))
(query (match-string 2 link))
(url (concat
kiwix-server-url
- [elpa] externals/kiwix f6a5f4c 048/192: Merge tag 'v0.4.0' into develop, (continued)
- [elpa] externals/kiwix f6a5f4c 048/192: Merge tag 'v0.4.0' into develop, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 160b228 049/192: fix cl-lib version, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 90658b7 050/192: support old format library name, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 5bfc5a2 053/192: support more flexible library name, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix d5e1ad0 057/192: add config section comments., Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 38986bb 058/192: Merge branch 'release/v0.4.3', Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 634b5ae 061/192: enhance function kiwix-query to support space between strings., Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix ec62ab0 063/192: Merge branch 'release/v0.5.0', Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix a11fcd4 064/192: remove org-mode link prefix setup, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 74ce07a 065/192: fix query invalid when the query contains space, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 6e85607 066/192: validate query is english or non-english.,
Stefan Monnier <=
- [elpa] externals/kiwix c325402 012/192: fix add kiwix link abbrev to org-mode list, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 5f60967 013/192: use browse-url to replace custom browser custom, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 53f2b72 008/192: add file kiwix-at-point.el, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 06ad0af 009/192: remove duplicate function names, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 6d7bc71 010/192: change default Kiwix library, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 126b172 015/192: update defgroup and defcustom, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 7413397 019/192: add options to whether add org-mode link support, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 9c9d784 020/192: fix cl-lib dependent issue, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 5d25121 021/192: fix alias function name, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix aa4ac22 023/192: improve interactive function, Stefan Monnier, 2020/12/19