org-odt.el: Fix earlier commit
This commit is contained in:
parent
90beabb7ab
commit
4beec074d0
|
@ -33,17 +33,17 @@
|
|||
:tag "Org Export ODT"
|
||||
:group 'org-export)
|
||||
|
||||
(defvar org-lparse-dyn-first-heading-pos) ; let bound during org-do-lparse
|
||||
(defun org-odt-insert-toc ()
|
||||
(goto-char (point-min))
|
||||
(cond
|
||||
((re-search-forward
|
||||
"\\(<text:p [^>]*>\\)?\\s-*\\[TABLE-OF-CONTENTS\\]\\s-*\\(</text:p>\\)?"
|
||||
nil t)
|
||||
(goto-char (match-beginning 0))
|
||||
(replace-match ""))
|
||||
(t
|
||||
(goto-char org-lparse-dyn-first-heading-pos))
|
||||
(insert (org-odt-format-toc))))
|
||||
(goto-char org-lparse-dyn-first-heading-pos)))
|
||||
(insert (org-odt-format-toc)))
|
||||
|
||||
(defun org-odt-end-export ()
|
||||
(org-odt-insert-toc)
|
||||
|
|
Loading…
Reference in New Issue