Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
94e8fa7ca0
2 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  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)))