diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 117f78c1e..b1f3cbc9a 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-02-06 Carsten Dominik + * org-exp.el (org-export-preprocess-string): Fix bug when skipping + text before first headline. + * org.el (org-format-latex): Do not convert LaTeX fragments in protected examples. diff --git a/lisp/org-exp.el b/lisp/org-exp.el index be6e37d42..9f2275611 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -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")))