diff lisp/org/org-exp.el @ 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 6d71fc980cde
children 31625710c524
line wrap: on
line diff
--- 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")))