Rewrite org-rst-verse-block
This commit is contained in:
10
ox-rst.el
10
ox-rst.el
@@ -1501,11 +1501,11 @@ channel."
|
|||||||
"Transcode a VERSE-BLOCK element from Org to reStructuredText.
|
"Transcode a VERSE-BLOCK element from Org to reStructuredText.
|
||||||
CONTENTS is verse block contents. INFO is a plist holding
|
CONTENTS is verse block contents. INFO is a plist holding
|
||||||
contextual information."
|
contextual information."
|
||||||
(concat
|
(let ((lines (split-string contents "\n")))
|
||||||
(replace-regexp-in-string "^" "| " (if (> (string-width contents) 1)
|
(cond ((> (length lines) 0)
|
||||||
(substring contents 0 -1)
|
(mapconcat
|
||||||
contents)) "\n"))
|
(function (lambda (x) (if (> (string-width x) 0)
|
||||||
|
(concat "| " x "\n") ""))) lines "")))))
|
||||||
|
|
||||||
|
|
||||||
;;; Filters
|
;;; Filters
|
||||||
|
|||||||
Reference in New Issue
Block a user