- Mount `hdic-ktb-entry-type' instead of `hdic-ktb-type'.
authorMORIOKA Tomohiko <tomo.git@chise.org>
Mon, 17 Jan 2022 05:19:31 +0000 (14:19 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Wed, 19 Jan 2022 01:03:51 +0000 (10:03 +0900)
- Mount `hdic-ktb-ndl-pid'.
- Mount `<-HDIC-SYP@KTB' instead of `<-same@SYP/KTB'.
- Mount `->HDIC-SYP@KTB' instead of `->same@SYP/KTB'.
(www-format-encode-string): Add settings for `===chise-hdic-ktb' and
`=chise-hdic-ktb'.

cwiki-common.el

index 0e1f7c5..937afa5 100644 (file)
 (mount-char-attribute-table '=hdic-ktb-entry-id)
 (mount-char-attribute-table 'hdic-syp-description)
 (mount-char-attribute-table 'hdic-ktb-description)
-(mount-char-attribute-table 'hdic-ktb-type)
+(mount-char-attribute-table 'hdic-ktb-entry-type)
 (mount-char-attribute-table 'hdic-ktb-diff)
 (mount-char-attribute-table 'hdic-ktb-syp-id)
 (mount-char-attribute-table 'hdic-ktb-yy-id)
-(mount-char-attribute-table '<-same@SYP/KTB)
-(mount-char-attribute-table '->same@SYP/KTB)
+(mount-char-attribute-table 'hdic-ktb-ndl-pid)
+(mount-char-attribute-table '<-HDIC-SYP@KTB)
+(mount-char-attribute-table '->HDIC-SYP@KTB)
 
 (defvar est-hide-cgi-mode nil)
 (defvar est-view-url-prefix "..")
@@ -1176,6 +1177,20 @@ class=\"tooltiptext\">%s</span></div>"
               t 'literal)))
 
          (goto-char (point-min))
+         (while (re-search-forward "&\\(R-\\)?CHISE-HDIC-KTB\\([0-9A-F]+\\);" nil t)
+           (setq code (string-to-int (match-string 2) 16))
+           (setq char (decode-char '===chise-hdic-ktb code))
+           (when (setq ret (get-char-attribute char '=hdic-ktb-entry-id))
+             (replace-match
+              (format
+               "<div class=\"tooltip\"><img alt=\"HDIC-KTB-%s\" src=\"https://hdic.chise.org/img/ktb/%s.jpg\" style=\"
+vertical-align:middle; width: auto; max-height: 60px\"><span
+class=\"tooltiptext\">%s</span></div>"
+               ret ret
+               (charset-description '===chise-hdic-ktb))
+              t 'literal)))
+
+         (goto-char (point-min))
          (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?AJ1-\\([0-9]+\\);" nil t)
            (setq code (string-to-int (match-string 2)))
            (replace-match