OSDN Git Service

BugTrack/317:テンプレート読み込み時に見出しの固有IDを削除する
authorarino <arino>
Fri, 2 May 2003 07:38:32 +0000 (16:38 +0900)
committerarino <arino>
Fri, 2 May 2003 07:38:32 +0000 (16:38 +0900)
func.php

index 69a9d0f..2b593fb 100644 (file)
--- a/func.php
+++ b/func.php
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: func.php,v 1.35 2003/04/29 00:35:43 arino Exp $
+// $Id: func.php,v 1.36 2003/05/02 07:38:32 arino Exp $
 //
 
 // Ê¸»úÎó¤¬InterWikiName¤«¤É¤¦¤«
@@ -148,6 +148,8 @@ function auto_template($page)
                        if (is_page($template_page))
                        {
                                $body = join('',get_source($template_page));
+                               // ¸«½Ð¤·¤Î¸ÇÍ­IDÉô¤òºï½ü
+                               $body = preg_replace('/^(\*{1,3}.*)\[#[A-Za-z][\w-]+\](.*)$/m','$1$2',$body);
                                // #freeze¤òºï½ü
                                $body = preg_replace('/^#freeze\s*$/m','',$body);