Reformat footnotes in index page

This commit is contained in:
TEC 2021-05-01 00:37:01 +08:00
parent 2f81254c9d
commit 21fb68a134
Signed by: tec
GPG key ID: 779591AFDB81F06C

View file

@ -59,6 +59,10 @@ modified for inclusion.
(org-backward-element) (org-backward-element)
(delete-region (point) (point-max)) (delete-region (point) (point-max))
(insert (format "[[file:%s.html][Read more...]]" (file-name-base file)))) (insert (format "[[file:%s.html][Read more...]]" (file-name-base file))))
;; Remove undefined footnotes
(goto-char (point-min))
(while (re-search-forward "\\[fn:\\(.+?\\)\\]" nil t)
(replace-match "^{[\\1]}"))
(buffer-string))) (buffer-string)))
#+end_src #+end_src