input/{chinese,japanese}: fix org-html advice regexp #1649
This commit is contained in:
parent
956b8cc532
commit
ef4424bda6
2 changed files with 14 additions and 6 deletions
|
@ -36,11 +36,15 @@
|
||||||
when exporting org-mode to html."
|
when exporting org-mode to html."
|
||||||
:filter-args #'org-html-paragraph
|
:filter-args #'org-html-paragraph
|
||||||
(cl-destructuring-bind (paragraph contents info) args
|
(cl-destructuring-bind (paragraph contents info) args
|
||||||
(let* ((fix-regexp "[[:multibyte:]]")
|
(let* ((fix-regexp "[[:multibyte:]a-zA-Z0-9]")
|
||||||
(origin-contents contents)
|
(origin-contents contents)
|
||||||
(fixed-contents
|
(fixed-contents
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
(concat "\\(" fix-regexp "\\) *\n *\\(" fix-regexp "\\)")
|
(concat "\\("
|
||||||
"\\1\\2"
|
fix-regexp
|
||||||
|
"\\) *\\(<[Bb][Rr] */>\\)?\n *\\("
|
||||||
|
fix-regexp
|
||||||
|
"\\)")
|
||||||
|
"\\1\\3"
|
||||||
origin-contents)))
|
origin-contents)))
|
||||||
(list paragraph fixed-contents info))))
|
(list paragraph fixed-contents info))))
|
||||||
|
|
|
@ -46,11 +46,15 @@
|
||||||
when exporting org-mode to html."
|
when exporting org-mode to html."
|
||||||
:filter-args #'org-html-paragraph
|
:filter-args #'org-html-paragraph
|
||||||
(cl-destructuring-bind (paragraph contents info) args
|
(cl-destructuring-bind (paragraph contents info) args
|
||||||
(let* ((fix-regexp "[[:multibyte:]]")
|
(let* ((fix-regexp "[[:multibyte:]a-zA-Z0-9]")
|
||||||
(origin-contents contents)
|
(origin-contents contents)
|
||||||
(fixed-contents
|
(fixed-contents
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
(concat "\\(" fix-regexp "\\) *\n *\\(" fix-regexp "\\)")
|
(concat "\\("
|
||||||
"\\1\\2"
|
fix-regexp
|
||||||
|
"\\) *\\(<[Bb][Rr] */>\\)?\n *\\("
|
||||||
|
fix-regexp
|
||||||
|
"\\)")
|
||||||
|
"\\1\\3"
|
||||||
origin-contents)))
|
origin-contents)))
|
||||||
(list paragraph fixed-contents info))))
|
(list paragraph fixed-contents info))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue