2009-02-06 Carsten Dominik <dominik@science.uva.nl>
authorCarsten Dominik <dominik@science.uva.nl>
Fri, 6 Feb 2009 11:47:58 +0000 (11:47 +0000)
committerCarsten Dominik <dominik@science.uva.nl>
Fri, 6 Feb 2009 11:47:58 +0000 (11:47 +0000)
* org-exp.el (org-export-preprocess-string): Fix bug with skipping
text before first headline.

lisp/org/ChangeLog
lisp/org/org-exp.el

index da098fd..f36f07a 100644 (file)
@@ -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.
 
index e302052..cf94d5e 100644 (file)
@@ -1538,7 +1538,7 @@ on this string to produce the exported version."
       ;; 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")))