(www-format-encode-string): Add settings for `===chise-hdic-ktb' and
authorMORIOKA Tomohiko <tomo.git@chise.org>
Tue, 18 Jan 2022 03:04:32 +0000 (12:04 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Tue, 18 Jan 2022 14:43:16 +0000 (23:43 +0900)
`=chise-hdic-ktb'.

www/www-ids-find.el

index 3596bbf..c7e95c6 100644 (file)
@@ -320,6 +320,18 @@ vertical-align:middle; width: auto; max-height: 60px\">"
               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
+               "<img alt=\"HDIC-KTB-%s\" src=\"https://hdic.chise.org/img/ktb/%s.jpg\" style=\"
+vertical-align:middle; width: auto; max-height: 60px\">"
+               ret ret)
+              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