diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a5904f43f..22f885007 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-08-16 Carsten Dominik + + * org-html.el (org-export-as-html): Fix bug in footnote regexp. + (org-export-as-html): Format footnotes correctly. + 2009-08-14 Carsten Dominik * org.el (org-fast-tag-selection): Avoid text properties on tags diff --git a/lisp/org-html.el b/lisp/org-html.el index 5f7ecac12..b329ad8d1 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1161,7 +1161,7 @@ lang=\"%s\" xml:lang=\"%s\"> ;; Does this contain a reference to a footnote? (when org-export-with-footnotes (setq start 0) - (while (string-match "\\([^* \t].*\\)?\\[\\([0-9]+\\)\\]" line start) + (while (string-match "\\([^* \t].*?\\)\\[\\([0-9]+\\)\\]" line start) (if (get-text-property (match-beginning 2) 'org-protected line) (setq start (match-end 2)) (let ((n (match-string 2 line)) extra a) @@ -1174,10 +1174,10 @@ lang=\"%s\" xml:lang=\"%s\"> (setq line (replace-match (format - (concat (if (match-string 1 line) "%s" "") + (concat "%s" (format org-export-html-footnote-format "%s")) - (match-string 1 line) n extra n n) + (or (match-string 1 line) "") n extra n n) t t line)))))) (cond @@ -1331,10 +1331,11 @@ lang=\"%s\" xml:lang=\"%s\"> (let ((n (match-string 1 line))) (setq org-par-open t line (replace-match - (concat "

" - (format org-export-html-footnote-format - "%s" - n n n) t t line)))))) + (format + (concat "

" + (format org-export-html-footnote-format + "%s")) + n n n) t t line))))) ;; Check if the line break needs to be conserved (cond ((string-match "\\\\\\\\[ \t]*$" line)