From: masui Date: Tue, 15 Oct 2002 06:14:46 +0000 (+0900) Subject: [[BugTrack/156]] #contentsにも((注釈))がついてしまう問題を修正 X-Git-Tag: r1_5_0_rc1~1996 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ff8e0a0302bd5b1d9253fba899cf053726cb9b11;p=pukiwiki%2Fpukiwiki.git [[BugTrack/156]] #contentsにも((注釈))がついてしまう問題を修正 --- diff --git a/html.php b/html.php index b520a67..f16e656 100644 --- a/html.php +++ b/html.php @@ -1,6 +1,6 @@ $str $top_link"); - $arycontents[] = str_repeat("-",$level-1)."".strip_htmltag(make_user_rules($str))."\n"; - $content_count++; - } - else if(preg_match("/^(-{1,4})(.*)/",$line,$out)) + $level = strlen($out[1]) + 1; + + array_push($result, "$str $top_link"); ++ $arycontents[] = str_repeat("-",$level-1)."".strip_htmltag(make_user_rules(inline($out[2],TRUE)))."\n"; + $content_count++; + } + else if(preg_match("/^(-{1,4})(.*)/",$line,$out)) { $headform[$_cnt] = $out[1]; if(strlen($out[1]) == 4) @@ -394,11 +394,12 @@ function list_push(&$result,&$saved,$tag,$level) { } // ¥¤¥ó¥é¥¤¥óÍ×ÁǤΥѡ¼¥¹ (Ãí¼á) -function inline($line) +function inline($line,$remove=FALSE) { $line = htmlspecialchars($line); - $line = preg_replace("/\(\(((?:(?!\)\)).)*)\)\)/ex","make_note(\"$1\")",$line); + $replace = $remove ? '' : 'make_note("$1")'; + $line = preg_replace("/\(\(((?:(?!\)\)).)*)\)\)/ex",$replace,$line); return $line; }