[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] emacs-wiki.el need modification
From: |
Xin Wei Hu |
Subject: |
[emacs-wiki-discuss] emacs-wiki.el need modification |
Date: |
Tue, 25 May 2004 23:06:23 +0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) |
Hi all:
According to the current emacs-wiki.el from sacha,
emacs-wiki-changelog-markup need to be modified to produce correct
html file. The keypoint is
[emacs-wiki-tag-regexp 0 emacs-wiki-markup-custom-tags] must be the
last item in the list, otherwise tags like <lisp> will not be
parsed because emacs-wiki-publishing-header is inserted after that.
Any comments?
(setq emacs-wiki-changelog-markup
(list
["&" 0 "&"]
["<" 0 "<"]
[">" 0 ">"]
["^\\(\\S-+\\)\\s-+\\(.+\\)" 0 emacs-wiki-markup-changelog-section]
;; emphasized or literal text
["\\(^\\|[-[ \t\n<('`\"]\\)\\(=[^= \t\n]\\|_[^_ \t\n]\\|\\*+[^* \t\n]\\)"
2 emacs-wiki-markup-word]
;; headings, outline-mode style
["^\\*\\s-+\\(.+\\)$" 0 "<h2>\\1</h2>"]
;; escape the 'file' entries, incase they are extended wiki links
["^[ \t]+\\* \\([^:(]+\\)\\([ \t]+(\\|:\\)" 0
emacs-wiki-changelog-escape-files]
;; don't require newlines between unnumbered lists.
["^\\s-*\\(\\*\\)" 1 "\n\\1"]
;; the beginning of the buffer begins the first paragraph
["\\`\n*" 0 "<p>\n"]
;; plain paragraph separator
["\n\\([ \t]*\n\\)+" 0 "\n\n</p>\n\n<p>\n"]
;; unnumbered List items begin with a -. numbered list items
;; begin with number and a period. definition lists have a
;; leading term separated from the body with ::. centered
;; paragraphs begin with at least six columns of whitespace; any
;; other whitespace at the beginning indicates a blockquote. The
;; reason all of these rules are handled here, is so that
;; blockquote detection doesn't interfere with indented list
;; members.
["^\\(\\s-*\\(\\*\\)\\)?\\([ \t]+\\)\\(\\([^\n]\n?\\)+\\)" 3
"<ul>\n<li>\n\\4</li></ul>\n"]
;; join together the parts of a list
["</\\([oud]l\\)>\\s-*\\(</p>\\s-*<p>\\s-*\\)?<\\1>\\s-*" 0 ""]
;; fixup paragraph delimiters
(vector
(concat "<p>\\s-*\\(</?" emacs-wiki-block-groups-regexp ">\\)") 0 "\\1")
(vector (concat "\\(</?" emacs-wiki-block-groups-regexp
">\\)\\s-*\\(</p>\\)") 3 "\\1")
;; terminate open paragraph at the end of the buffer
["<p>\\s-*\\'" 0 ""]
;; make sure to close any open text (paragraphs)
["\\([^> \t\n]\\)\\s-*\\'" 0 "\\1\n</p>"]
;; bare email addresses
(vector
(concat
"\\([^-+:.@/a-zA-Z0-9]\\)"
"\\(address@hidden([-a-zA-Z0-9_]+\\.\\)+[a-zA-Z0-9]+\\)"
"\\([^-\"a-zA-Z0-9]\\)")
0
"\\1<a href=\"mailto:\\2\">\\2</a>\\4")
;; replace WikiLinks in the buffer (links to other pages)
[emacs-wiki-url-or-name-regexp 0 emacs-wiki-markup-link]
["''''" 0 ""]
;; insert the default publishing header
(function
(lambda ()
(if (file-readable-p emacs-wiki-publishing-header)
(insert-file-contents emacs-wiki-publishing-header)
(insert emacs-wiki-publishing-header))))
;; insert the default publishing footer
(function
(lambda ()
(goto-char (point-max))
(if (file-readable-p emacs-wiki-publishing-footer)
(insert-file-contents emacs-wiki-publishing-footer)
(insert emacs-wiki-publishing-footer))))
;; process any custom markup tags
[emacs-wiki-tag-regexp 0 emacs-wiki-markup-custom-tags]))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [emacs-wiki-discuss] emacs-wiki.el need modification,
Xin Wei Hu <=