Browse Source

Export: Remove footnote references from TOC lines

Carsten Dominik 15 năm trước cách đây
mục cha
commit
146faeeb96
2 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 3 0
      lisp/ChangeLog
  2. 2 0
      lisp/org-exp.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-09-03  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-exp.el (org-export-cleanup-toc-line): Remove footnote
+	references from TOC lines.
+
 	* org.el (org-selected-window): New variable.
 
 	* org-table.el (org-table-edit-formulas): Remember the selected

+ 2 - 0
lisp/org-exp.el

@@ -2807,6 +2807,8 @@ If yes remove the column and the special lines."
   (while (string-match org-bracket-link-regexp s)
     (setq s (replace-match (match-string (if (match-end 3) 3 1) s)
 			   t t s)))
+  (while (string-match "\\[\\([0-9]\\|fn:[^]]*\\)\\]" s)
+    (setq s (replace-match "" t t s)))
   s)
 
 (defun org-create-multibrace-regexp (left right n)