#relatedの出力でHTMLのタグ出力が不整合を起こしてます。
1.4系と1.3系の両方で不整合が起きますが、その出力は微妙に異なります。
<ul> <li>....</li> <li>....</li> ............ <li>....</li> <li>....</li> </ul>となるべきところが、
.....</li> <li>....</li> ........... <li>....</li> <li>....と出力されてしまっている。開始部分の<ul><li>と終了部分の</li></ul>が欠落。
<ul> <li>....</li> <li>....</li> ............ <li>....</li> <li>....</li> </ul>となるべきところが、
<p>.....</li> <li>....</li> ........... <li>....</li> <li>....</p>と出力されてしまっている。開始部分の<ul><li>が<p>に、終了部分の</li></ul>が</p>に化けている。
-#related
- 関連するページ名 -- #related
Index: convert_html.php =================================================================== RCS file: /cvsroot/pukiwiki/pukiwiki/convert_html.php,v retrieving revision 1.45 diff -u -r1.45 convert_html.php --- convert_html.php 12 Jun 2003 00:44:30 -0000 1.45 +++ convert_html.php 27 Jun 2003 23:00:13 -0000 @@ -831,7 +831,8 @@ // 関連するページ // <p>のときは行頭から、<del>のときは他の要素の子要素として存在 - $text = preg_replace('/<(p|del)>#related<\/\1>/e','make_related($vars[\'page\'],\'$1\')',$text); + $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); return $text; } function block(&$lines,$start,$end,$class) Index: html.php =================================================================== RCS file: /cvsroot/pukiwiki/pukiwiki/html.php,v retrieving revision 1.82 diff -u -r1.82 html.php --- html.php 22 Jun 2003 05:47:17 -0000 1.82 +++ html.php 27 Jun 2003 23:00:13 -0000 @@ -244,16 +244,11 @@ "<a href=\"$script?$r_page\">$s_page</a>$passage"; } - if ($tag) { - $retval = join($rule_related_str,$_links); - if ($tag == 'p') { - $margin = $_ul_left_margin + $_ul_margin; - $style = sprintf($_list_pad_str,1,$margin,$margin); - $retval = "\n<ul class=\"list1\" style=\"$style\">\n<li>$retval</li>\n</ul>\n"; - } - } - else { - $retval = join($related_str,$_links); + $retval = join($rule_related_str,$_links); + if ($tag == 'p') { + $margin = $_ul_left_margin + $_ul_margin; + $style = sprintf($_list_pad_str,1,$margin,$margin); + $retval = "\n<ul $style>\n<li>$retval</li>\n</ul>\n"; } return $retval; }
diff -u -r1.47 convert_html.php --- convert_html.php 30 Jun 2003 00:38:21 -0000 1.47 +++ convert_html.php 4 Jul 2003 10:10:31 -0000 @@ -832,7 +832,7 @@ // 関連するページ // <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) diff -u -r1.86 html.php --- html.php 30 Jun 2003 06:12:28 -0000 1.86 +++ html.php 4 Jul 2003 10:10:31 -0000 @@ -244,11 +244,15 @@ "<a href=\"$script?$r_page\">$s_page</a>$passage"; } - if ($tag == 'p') + if ($tag) { - $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 = join($rule_related_str,$_links); + 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"; + } } else {