summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-10-24 13:56:56 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-10-24 13:56:56 +0200
commitbebfd341afaa0a19ccb9b5cd530f29f65d815cf9 (patch)
tree93c1964ba28794552c16a3e223105d7893d0e4d1
parent048169d27050745bb72b8ccbe6f17e525310d94e (diff)
parent5c91976b4958117e8b746de818df34cb7a540a87 (diff)
downloadorg-mode-bebfd341afaa0a19ccb9b5cd530f29f65d815cf9.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/ox-texinfo.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index 259e552..caac558 100644
--- a/lisp/ox-texinfo.el
+++ b/lisp/ox-texinfo.el
@@ -83,7 +83,8 @@
:filters-alist
'((:filter-headline . org-texinfo--filter-section-blank-lines)
(:filter-parse-tree . org-texinfo--normalize-headlines)
- (:filter-section . org-texinfo--filter-section-blank-lines))
+ (:filter-section . org-texinfo--filter-section-blank-lines)
+ (:filter-final-output . org-texinfo--untabify))
:menu-entry
'(?i "Export to Texinfo"
((?t "As TEXI file" org-texinfo-export-to-texinfo)
@@ -408,6 +409,10 @@ If two strings share the same prefix (e.g. \"ISO-8859-1\" and
;;; Internal Functions
+(defun org-texinfo--untabify (s _backend _info)
+ "Remove TAB characters in string S."
+ (replace-regexp-in-string "\t" (make-string tab-width ?\s) s))
+
(defun org-texinfo--filter-section-blank-lines (headline _backend _info)
"Filter controlling number of blank lines after a section."
(replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" "\n\n" headline))