OSDN Git Service

BugTrack/400の続き: #relatedの吐くタグを微調整
authorarino <arino>
Sat, 5 Jul 2003 01:40:49 +0000 (10:40 +0900)
committerarino <arino>
Sat, 5 Jul 2003 01:40:49 +0000 (10:40 +0900)
convert_html.php
html.php

index a749cd9..6a33c16 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: convert_html.php,v 1.47 2003/06/30 00:38:21 arino Exp $
+// $Id: convert_html.php,v 1.48 2003/07/05 01:40:49 arino Exp $
 //
 function convert_html($lines)
 {
@@ -832,7 +832,7 @@ class Body extends Block
                // ´ØÏ¢¤¹¤ë¥Ú¡¼¥¸
                // <p>¤Î¤È¤­¤Ï¹ÔƬ¤«¤é¡¢<del>¤Î¤È¤­¤Ï¾¤ÎÍ×ÁǤλÒÍ×ÁǤȤ·¤Æ¸ºß
                $text = preg_replace('/<p><del>#related<\/del><\/p>/',make_related($vars['page'],'p'),$text);
-               $text = preg_replace('/<del>#related<\/del>/',make_related($vars['page']),$text);
+               $text = preg_replace('/<del>#related<\/del>/',make_related($vars['page'],'del'),$text);
                return $text;
        }
        function block(&$lines,$start,$end,$class)
index 58d429e..6b1e95e 100644 (file)
--- a/html.php
+++ b/html.php
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: html.php,v 1.87 2003/07/05 01:31:55 arino Exp $
+// $Id: html.php,v 1.88 2003/07/05 01:40:49 arino Exp $
 //
 
 // ËÜʸ¤ò½ÐÎÏ
@@ -240,11 +240,15 @@ function make_related($page,$tag='')
                        "<a href=\"$script?$r_page\">$s_page</a>$passage";
        }
        
-       if ($tag == 'p')
+       if ($tag == 'p') // ¹ÔƬ¤«¤é
        {
                $margin = $_ul_left_margin + $_ul_margin;
                $style = sprintf($_list_pad_str,1,$margin,$margin);
-               $retval =  "\n<ul $style>\n<li>".join($rule_related_str,$_links)."</li>\n</ul>\n";
+               $retval =  "\n<ul$style>\n<li>".join($rule_related_str,$_links)."</li>\n</ul>\n";
+       }
+       else if ($tag)
+       {
+               $retval = join($rule_related_str,$_links);
        }
        else
        {