branch: externals/kiwix
commit 97822f1ffc3d76f8bb7e2e0b1e648d018ed6ca08
Author: stardiviner <[email protected]>
Commit: stardiviner <[email protected]>

    convert between librarie full name and abbrev.
---
 kiwix.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kiwix.el b/kiwix.el
index 8793e9e..f6135d3 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -140,7 +140,10 @@ for query string and library interactively."
   "Open LINK in external wiki program."
   (cond ((string-match "\\(.*\\):(\\(.*\\)):\\(.*\\)"  link)
          (let* ((type (match-string 1 link))
-                (library (match-string 2 link))
+                ;; convert between libraries full name and abbrev.
+                (library (cdr (assoc
+                               (match-string 2 link)
+                               kiwix-librarie-abbrev-list)))
                 (query (match-string 3 link))
                 (url (concat kiwix-server-url library "/A/" (url-encode-url 
(capitalize query)) ".html")))
            (browse-url url)))

Reply via email to