input/{chinese,japanese}: fix org-html-paragraph advice

This commit is contained in:
Sunn Yao 2019-09-02 12:48:33 +08:00 committed by Henrik Lissner
parent 05ab672ef9
commit 8f061eb6b8
2 changed files with 16 additions and 16 deletions

View file

@ -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))))