(www-format-encode-string): Add settings for `===chise-hdic-tsj' and
authorMORIOKA Tomohiko <tomo.git@chise.org>
Fri, 14 Jan 2022 04:23:48 +0000 (13:23 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Sun, 16 Jan 2022 05:52:29 +0000 (14:52 +0900)
`=chise-hdic-tsj'.

www/www-ids-find.el

index 512338f..5759c6d 100644 (file)
@@ -296,6 +296,18 @@ vertical-align:middle; width: auto; max-height: 60px\">"
             t 'literal))
 
          (goto-char (point-min))
+         (while (re-search-forward "&\\(R-\\)?CHISE-HDIC-TSJ\\([0-9A-F]+\\);" nil t)
+           (setq code (string-to-int (match-string 2) 16))
+           (setq char (decode-char '===chise-hdic-tsj code))
+           (when (setq ret (get-char-attribute char '=hdic-tsj-glyph-id))
+             (replace-match
+              (format
+               "<img alt=\"HDIC-TSJ-%s\" src=\"https://viewer.hdic.jp/img/tsj/%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