0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-17 09:06:28 +00:00

Export: Fix bug with exporting text before first heading

Skipping text before the first heading was broken, now it works again.
This commit is contained in:
Carsten Dominik 2009-02-06 12:44:52 +01:00
parent 44ed0394c4
commit 477141d43c
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2009-02-06 Carsten Dominik <carsten.dominik@gmail.com>
* 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.

View 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")))