From: MORIOKA Tomohiko Date: Mon, 15 Jun 2020 06:37:29 +0000 (+0900) Subject: (www-format-encode-string): Format &(A-)CDP-vddd-hhhh; and X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b1b1ea534020fa39be3f7b9fe4494440beba02dc;p=chise%2Fest.git (www-format-encode-string): Format &(A-)CDP-vddd-hhhh; and &(A-)M-ddddd; to display with GlyphWiki glyphs. --- diff --git a/cwiki-common.el b/cwiki-common.el index 336f9d4..dbd983b 100644 --- a/cwiki-common.el +++ b/cwiki-common.el @@ -1183,6 +1183,35 @@ style=\"vertical-align:middle; width: 48px; height: 48px\">" t 'literal)) (goto-char (point-min)) + (while (re-search-forward + "&\\(A-\\)?CDP-v\\([0-9]+\\)-\\([0-9A-F]+\\);" + nil t) + (setq plane (string-to-int (match-string 2)) + code (string-to-int (match-string 3) 16)) + (replace-match + (format "\"cdp-%04x-var-%03d\"" + code + plane + code + plane + www-format-char-img-style) + t 'literal)) + + (goto-char (point-min)) + (while (re-search-forward + "&\\(A-\\)?M-\\([0-9]+\\);" + nil t) + (setq code (string-to-int (match-string 2))) + (replace-match + (format "\"dkw-%05d\"" + code + code + www-format-char-img-style) + t 'literal)) + + (goto-char (point-min)) (while (re-search-forward "&\\(g2-\\)?U-v\\([0-9]+\\)\\+\\([0-9A-F]+\\);" nil t) (setq plane (string-to-int (match-string 2)) code (string-to-int (match-string 3) 16))