Browse Source

org-export: Prevent footnotes definitons from being enclosed with a section

* contrib/lisp/org-export.el (org-export-initial-options): Prevent
  footnotes definitons from being enclosed with a section.
Nicolas Goaziou 13 years ago
parent
commit
886154898c
1 changed files with 7 additions and 1 deletions
  1. 7 1
      contrib/lisp/org-export.el

+ 7 - 1
contrib/lisp/org-export.el

@@ -1050,7 +1050,13 @@ OPTIONS is the export options plist computed so far."
 	    (push (cons (car def)
 			(save-restriction
 			  (narrow-to-region (point) (nth 2 def))
-			  (org-element-parse-buffer)))
+			  ;; Like `org-element-parse-buffer', but
+			  ;; makes sure the definition doesn't start
+			  ;; with a section element.
+			  (nconc
+			   (list 'org-data nil)
+			   (org-element-parse-elements
+			    (point-min) (point-max) nil nil nil nil nil))))
 		  alist))))
       alist))))