Преглед изворни кода

Fix HTML export of footnotes with lists, tables, quotes, etc.

* org-html.el (org-export-as-html): Fix export of footnotes
containing lists, tables, quotes, etc.
Puneeth Chaganti пре 14 година
родитељ
комит
a201b11286
1 измењених фајлова са 6 додато и 3 уклоњено
  1. 6 3
      lisp/org-html.el

+ 6 - 3
lisp/org-html.el

@@ -1691,9 +1691,12 @@ lang=\"%s\" xml:lang=\"%s\">
 
       (save-excursion
 	(goto-char (point-min))
-	(while (re-search-forward "<p class=\"footnote\">[^\000]*?\\(</p>\\|\\'\\)" nil t)
-	  (push (match-string 0) footnotes)
-	  (replace-match "" t t)))
+	(while (re-search-forward 
+		"\\(\\(<p class=\"footnote\">\\)[^\000]*?\\)\\(\\(\\2\\)\\|\\'\\)" 
+		nil t)
+	  (push (match-string 1) footnotes)
+	  (replace-match "\\4" t nil)
+	  (goto-char (match-beginning 0))))
       (when footnotes
 	(insert (format org-export-html-footnotes-section
 			(nth 4 lang-words)