From b1b1ea534020fa39be3f7b9fe4494440beba02dc Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Mon, 15 Jun 2020 15:37:29 +0900 Subject: [PATCH] (www-format-encode-string): Format &(A-)CDP-vddd-hhhh; and &(A-)M-ddddd; to display with GlyphWiki glyphs. --- cwiki-common.el | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) 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)) -- 1.7.10.4