input/{chinese,japanese}: fix org-html-paragraph advice
This commit is contained in:
parent
05ab672ef9
commit
8f061eb6b8
2 changed files with 16 additions and 16 deletions
|
@ -36,15 +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:]a-zA-Z0-9]")
|
(let* ((fix-regexp "[[:multibyte:]]")
|
||||||
(origin-contents contents)
|
(origin-contents
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"<[Bb][Rr] */>"
|
||||||
|
""
|
||||||
|
contents))
|
||||||
(fixed-contents
|
(fixed-contents
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
(concat "\\("
|
(concat "\\(" fix-regexp "\\) *\n *\\(" fix-regexp "\\)")
|
||||||
fix-regexp
|
"\\1\\2"
|
||||||
"\\) *\\(<[Bb][Rr] */>\\)?\n *\\("
|
|
||||||
fix-regexp
|
|
||||||
"\\)")
|
|
||||||
"\\1\\3"
|
|
||||||
origin-contents)))
|
origin-contents)))
|
||||||
(list paragraph fixed-contents info))))
|
(list paragraph fixed-contents info))))
|
||||||
|
|
|
@ -46,15 +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:]a-zA-Z0-9]")
|
(let* ((fix-regexp "[[:multibyte:]]")
|
||||||
(origin-contents contents)
|
(origin-contents
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"<[Bb][Rr] */>"
|
||||||
|
""
|
||||||
|
contents))
|
||||||
(fixed-contents
|
(fixed-contents
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
(concat "\\("
|
(concat "\\(" fix-regexp "\\) *\n *\\(" fix-regexp "\\)")
|
||||||
fix-regexp
|
"\\1\\2"
|
||||||
"\\) *\\(<[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