convert wiki notation from wiliki to souceforge.jp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*-emacs-lisp-*- | |
;; converting wiki notation from wiliki to souceforge.jp | |
(defun sf () | |
"converting wiki notation from wiliki to souceforge.jp" | |
(interactive) | |
(save-excursion | |
;; heading | |
(goto-char (point-min)) | |
(replace-regexp "^\* " "= ") | |
(goto-char (point-min)) | |
(replace-regexp "^\*\* " "== ") | |
(goto-char (point-min)) | |
(replace-regexp "^\*\*\* " "=== ") | |
;; itemize | |
(goto-char (point-min)) | |
(replace-regexp "^- " " * ") | |
(goto-char (point-min)) | |
(replace-regexp "^-- " " * ") | |
(goto-char (point-min)) | |
(replace-regexp "^--- " " * ") | |
(goto-char (point-min)) | |
(replace-regexp "^---- " " * ") | |
;; link | |
(goto-char (point-min)) | |
(replace-string "[[" "[") | |
(goto-char (point-min)) | |
(replace-string "]]" "]") | |
(goto-char (point-min)) | |
;; table | |
(replace-string "|" "||") | |
(goto-char (point-min)) | |
;; line break | |
(replace-string "~%" "[[BR]]") | |
(goto-char (point-min)) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment