input/{chinese,japanese}: fix org-html advice regexp #1649

This commit is contained in:
Henrik Lissner 2019-08-07 23:36:21 -04:00
parent 956b8cc532
commit ef4424bda6
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 14 additions and 6 deletions

View file

@ -36,11 +36,15 @@
when exporting org-mode to html."
:filter-args #'org-html-paragraph
(cl-destructuring-bind (paragraph contents info) args
(let* ((fix-regexp "[[:multibyte:]]")
(let* ((fix-regexp "[[:multibyte:]a-zA-Z0-9]")
(origin-contents contents)
(fixed-contents
(replace-regexp-in-string
(concat "\\(" fix-regexp "\\) *\n *\\(" fix-regexp "\\)")
"\\1\\2"
(concat "\\("
fix-regexp
"\\) *\\(<[Bb][Rr] */>\\)?\n *\\("
fix-regexp
"\\)")
"\\1\\3"
origin-contents)))
(list paragraph fixed-contents info))))

View file

@ -46,11 +46,15 @@
when exporting org-mode to html."
:filter-args #'org-html-paragraph
(cl-destructuring-bind (paragraph contents info) args
(let* ((fix-regexp "[[:multibyte:]]")
(let* ((fix-regexp "[[:multibyte:]a-zA-Z0-9]")
(origin-contents contents)
(fixed-contents
(replace-regexp-in-string
(concat "\\(" fix-regexp "\\) *\n *\\(" fix-regexp "\\)")
"\\1\\2"
(concat "\\("
fix-regexp
"\\) *\\(<[Bb][Rr] */>\\)?\n *\\("
fix-regexp
"\\)")
"\\1\\3"
origin-contents)))
(list paragraph fixed-contents info))))