WiLiKi/本体の修正

打ち消し線を書くための修正

  • %%こんなの%%
        - /home/shin/WiLiKi.cvs/WiLiKi.make/src/wiliki/format.scm     Mon May  2 20:27:34 2005
+++ format.scm  Mon May  2 20:44:08 2005
@@ -236,10 +236,19 @@
              (find-closer post (- level 1) (list* "]]" pre in))))))
   ;; deal with other inline items between wikinames
   ;; NB: the precedence is embedded to the order of calling regexp-fold.
+  (define (strike line seed)
+    (regexp-fold
+     #/%%([^%].*?)?%%/
+     cons
+     (lambda (match seed)
+       (if (or (not (match 1)) (string-null? (match 1)))
+         seed
+         (cons `(strike ,@(reverse! (nl (match 1) '()))) seed)))
+     seed line))
   (define (mailto line seed)
     (regexp-fold
      #/\[(mailto:[-\w]+(?:\.[-\w]+)*@[-\w]+(?:\.[-\w]+)+)\s+(.*)\]/
- cons
+     strike
      (lambda (match seed)
        (cons `(a (@ (href ,(match 1))) ,(match 2)) seed))
      seed line))

wiliki2.cgi からURLのフルパスを見たい

# diff -u wiliki.scm.orig wiliki.scm
        - wiliki.scm.orig     Tue Sep 20 15:45:02 2005
+++ wiliki.scm  Tue Sep 20 15:42:34 2005
@@ -46,7 +46,7 @@
   (use wiliki.format)
   (use wiliki.db)
   (export  wiliki-main wiliki
- wiliki:language-link wiliki:self-url
+          wiliki:language-link wiliki:self-url wiliki:self-url-full
           wiliki:top-link wiliki:edit-link wiliki:history-link
           wiliki:all-link wiliki:recent-link wiliki:search-box
           wiliki:menu-links wiliki:page-title
@@ -219,6 +219,7 @@
 
 ;; For export
 (define wiliki:self-url url)
+(define wiliki:self-url-full url-full)
 
 ;; Convenient wrapper
 (define (with-db thunk . rwmode)

Googlebotなどに 編集(c=e) を拾われたくない

↓いま気がついたけど、reverse patchになってる。パッチするときは気をつけて。

# diff -u wiliki.scm.orig wiliki.scm
        - wiliki.scm  Wed Oct 12 18:21:41 2005
+++ wiliki.scm.orig     Tue Sep 20 15:45:02 2005
@@ -670,9 +669,7 @@
          ((equal? command "lv")
           (with-db (cut cmd-lwp-view pagename)))
          ((equal? command "e")
- (if (#/(Googlebot|msnbot|NaverBot|Yahoo)/ (get-meta "HTTP_USER_AGENT"))
- (redirect-page pagename)
- (with-db (cut cmd-edit pagename))))
+          (with-db (cut cmd-edit pagename)))
          ((equal? command "a")
           (with-db cmd-all))
          ((equal? command "r")