changeset 101833:97ed2489367d

2009-02-06 Carsten Dominik <dominik@science.uva.nl> * org-exp.el (org-export-preprocess-string): Fix bug with skipping text before first headline.
author Carsten Dominik <dominik@science.uva.nl>
date Fri, 06 Feb 2009 11:47:58 +0000
parents aa61f808aca4
children 31625710c524
files lisp/org/ChangeLog lisp/org/org-exp.el
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/org/ChangeLog	Fri Feb 06 10:13:59 2009 +0000
+++ b/lisp/org/ChangeLog	Fri Feb 06 11:47:58 2009 +0000
@@ -1,5 +1,8 @@
 2009-02-06  Carsten Dominik  <dominik@science.uva.nl>
 
+	* org-exp.el (org-export-preprocess-string): Fix bug with skipping
+	text before first headline.
+
 	* org.el (org-format-latex): Stop LaTeX fragment processing in
 	protected examples.
 
--- a/lisp/org/org-exp.el	Fri Feb 06 10:13:59 2009 +0000
+++ b/lisp/org/org-exp.el	Fri Feb 06 11:47:58 2009 +0000
@@ -1538,7 +1538,7 @@
       ;; Get the correct stuff before the first headline
       (when (plist-get parameters :skip-before-1st-heading)
 	(goto-char (point-min))
-	(when (re-search-forward "\\(^#.*\n\\)^\\*+[ \t]" nil t)
+	(when (re-search-forward "^\\(#.*\n\\)?\\*+[ \t]" nil t)
 	  (delete-region (point-min) (match-beginning 0))
 	  (goto-char (point-min))
 	  (insert "\n")))