Rewrite org-rst-verse-block

This commit is contained in:
Igarashi Masanao
2018-02-17 23:44:10 +09:00
parent 47ad15097a
commit a42402f571

View File

@@ -1501,11 +1501,11 @@ channel."
"Transcode a VERSE-BLOCK element from Org to reStructuredText.
CONTENTS is verse block contents. INFO is a plist holding
contextual information."
(concat
(replace-regexp-in-string "^" "| " (if (> (string-width contents) 1)
(substring contents 0 -1)
contents)) "\n"))
(let ((lines (split-string contents "\n")))
(cond ((> (length lines) 0)
(mapconcat
(function (lambda (x) (if (> (string-width x) 0)
(concat "| " x "\n") ""))) lines "")))))
;;; Filters