From 8f061eb6b808325a9bf124c47a43568d187adef9 Mon Sep 17 00:00:00 2001 From: Sunn Yao Date: Mon, 2 Sep 2019 12:48:33 +0800 Subject: [PATCH] input/{chinese,japanese}: fix org-html-paragraph advice --- modules/input/chinese/config.el | 16 ++++++++-------- modules/input/japanese/config.el | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/input/chinese/config.el b/modules/input/chinese/config.el index 204bc0513..666cfe395 100644 --- a/modules/input/chinese/config.el +++ b/modules/input/chinese/config.el @@ -36,15 +36,15 @@ when exporting org-mode to html." :filter-args #'org-html-paragraph (cl-destructuring-bind (paragraph contents info) args - (let* ((fix-regexp "[[:multibyte:]a-zA-Z0-9]") - (origin-contents contents) + (let* ((fix-regexp "[[:multibyte:]]") + (origin-contents + (replace-regexp-in-string + "<[Bb][Rr] */>" + "" + contents)) (fixed-contents (replace-regexp-in-string - (concat "\\(" - fix-regexp - "\\) *\\(<[Bb][Rr] */>\\)?\n *\\(" - fix-regexp - "\\)") - "\\1\\3" + (concat "\\(" fix-regexp "\\) *\n *\\(" fix-regexp "\\)") + "\\1\\2" origin-contents))) (list paragraph fixed-contents info)))) diff --git a/modules/input/japanese/config.el b/modules/input/japanese/config.el index e94078c00..985db25b2 100644 --- a/modules/input/japanese/config.el +++ b/modules/input/japanese/config.el @@ -46,15 +46,15 @@ when exporting org-mode to html." :filter-args #'org-html-paragraph (cl-destructuring-bind (paragraph contents info) args - (let* ((fix-regexp "[[:multibyte:]a-zA-Z0-9]") - (origin-contents contents) + (let* ((fix-regexp "[[:multibyte:]]") + (origin-contents + (replace-regexp-in-string + "<[Bb][Rr] */>" + "" + contents)) (fixed-contents (replace-regexp-in-string - (concat "\\(" - fix-regexp - "\\) *\\(<[Bb][Rr] */>\\)?\n *\\(" - fix-regexp - "\\)") - "\\1\\3" + (concat "\\(" fix-regexp "\\) *\n *\\(" fix-regexp "\\)") + "\\1\\2" origin-contents))) (list paragraph fixed-contents info))))