瀏覽代碼

Remove "\\" during ASCII export.

"\\" at the end of a line marks forces line breaks for HTML and LaTeX
export.  ASCII export does preserve lines anyway, but these line break
indicators might still be present and need to be removed.

Reported by Rustom Mody.
Carsten Dominik 16 年之前
父節點
當前提交
94e8fa7ca0
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 3 0
      lisp/ChangeLog
  2. 3 0
      lisp/org-exp.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2008-11-21  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-exp.el (org-export-as-ascii): Remove the "\\" forced
+	line break indicators.
+
 	* org.el (org-ido-completing-read): Remove the "i:" prefix for
 	ido-completion propts.
 

+ 3 - 0
lisp/org-exp.el

@@ -2434,6 +2434,9 @@ underlined headlines.  The default is 3."
 		   "\n") "\n")))
        (t
 	(setq line (org-fix-indentation line org-ascii-current-indentation))
+	;; Remove forced line breaks
+	(if (string-match "\\\\\\\\[ \t]*$" line)
+	    (setq line (replace-match "" t t line)))
 	(if (and org-export-with-fixed-width
 		 (string-match "^\\([ \t]*\\)\\(:\\)" line))
 	    (setq line (replace-match "\\1" nil nil line)))