(www-format-encode-string):
authorMORIOKA Tomohiko <tomo.git@chise.org>
Fri, 14 Dec 2018 10:25:37 +0000 (19:25 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Fri, 14 Dec 2018 10:25:37 +0000 (19:25 +0900)
- Add code for &SW-JIGUGE[45]-ddddd;.
- Use "width: auto; max-height: 60px" instead of "width: 48px; height:
  48px" for HNG glyph images.

cwiki-common.el

index 9817062..cd01912 100644 (file)
@@ -1019,6 +1019,27 @@ style=\"vertical-align:middle\">"
             t 'literal))
 
          (goto-char (point-min))
+         (while (re-search-forward "&SW-JIGUGE\\([45]?\\)-\\([0-9]+\\);" nil t)
+           (setq subcode (match-string 1)
+                 code (string-to-int (match-string 2)))
+           (setq plane
+                 (if (string= subcode "")
+                     "5"
+                   subcode))
+           (replace-match
+            (format "<div class=\"tooltip\"><img alt=\"SW-JIGUGE%s-%05d\" src=\"%s/ShuoWen/Jiguge%s/%05d.png\"
+style=\"vertical-align:middle; width: auto; max-height: 80px\"><span
+class=\"tooltiptext\">%s</span></div>"
+                    plane code
+                    chise-wiki-bitmap-glyphs-url
+                    plane code
+                    (charset-description
+                     (if (string= subcode "")
+                         '=shuowen-jiguge
+                       (intern (format "===shuowen-jiguge%s" subcode)))))
+            t 'literal))
+
+         (goto-char (point-min))
          (while (re-search-forward "&HNG\\([0-9]+\\)-\\([0-9][0-9][0-9][0-9]\\)\\([0-9]\\);" nil t)
            (setq plane (match-string 1)
                  code (string-to-int (match-string 2))
@@ -1030,7 +1051,7 @@ style=\"vertical-align:middle\">"
            (replace-match
             (format
              "<div class=\"tooltip\"><img alt=\"HNG%s-%04d%s\" src=\"%s/%s/%04d%s.png\" style=\"
-vertical-align:middle; width: 48px; height: 48px\"><span
+vertical-align:middle; width: auto; max-height: 60px\"><span
 class=\"tooltiptext\">%s</span></div>"
              plane code subcode
              chise-wiki-hng-bitmap-glyphs-url