[cl-blogger commit] r12 - 2009-04-05 Plato Wu <standin-000@tianya.cn>

0 views
Skip to first unread message

codesite...@google.com

unread,
Apr 5, 2009, 11:19:23 AM4/5/09
to cl-bl...@googlegroups.com
Author: netawater
Date: Sun Apr 5 07:36:35 2009
New Revision: 12

Modified:
trunk/ChangeLog
trunk/blogger.el

Log:
2009-04-05 Plato Wu <stand...@tianya.cn>

* blogger.el (muse-html-markup-footnote):
redefine it to support multi post's footnote.


Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Sun Apr 5 07:36:35 2009
@@ -1,3 +1,8 @@
+2009-04-05 Plato Wu <stand...@tianya.cn>
+
+ * blogger.el (muse-html-markup-footnote):
+ redefine it to support multi post's footnote.
+
2009-03-28 Yoshinori Tahara <read.ev...@gmail.com>

* blogger.el (muse-blogger-markup-strings): defvar

Modified: trunk/blogger.el
==============================================================================
--- trunk/blogger.el (original)
+++ trunk/blogger.el Sun Apr 5 07:36:35 2009
@@ -24,3 +24,37 @@
(slime-repl-send-string
(format "(progn (require :blogger) (funcall (read-from-string
\"blogger:post\") #p\"%s\"))"
(buffer-file-name))))
+
+(defun muse-html-markup-footnote ()
+ (cond
+ ((get-text-property (match-beginning 0) 'muse-link)
+ nil)
+ ((= (muse-line-beginning-position) (match-beginning 0))
+ (prog1
+ (let ((text (match-string 1)))
+ (muse-insert-markup
+ (concat "<p class=\"footnote\">"
+ "<a class=\"footnum\" name=\""
(muse-publishing-directive "title") "fn." text
+; "\" href=\"#fnr." text "\">"
+ "\" href=\"#" (muse-publishing-directive "title") "fnr." text "\">"
+ text ".</a>")))
+ (save-excursion
+ (save-match-data
+ (let* ((beg (goto-char (match-end 0)))
+ (end (and (search-forward "\n\n" nil t)
+ (prog1
+ (copy-marker (match-beginning 0))
+ (goto-char beg)))))
+ (while (re-search-forward (concat "^["
+ muse-regexp-blank
+ "]+\\([^\n]\\)")
+ end t)
+ (replace-match "\\1" t)))))
+ (replace-match "")))
+ (t (let ((text (match-string 1)))
+ (muse-insert-markup
+ (concat "<sup><a class=\"footref\" name=\""
(muse-publishing-directive "title") "fnr." text
+; "\" href=\"#fn." text "\">"
+ "\" href=\"#" (muse-publishing-directive "title") "fn."
text "\">"
+ text "</a></sup>")))
+ (replace-match ""))))
\ No newline at end of file

Reply all
Reply to author
Forward
0 new messages