/////////////////////////////////////////////////
// PukiWiki - Yet another WikiWikiWeb clone.
//
-// $Id: html.php,v 1.14 2004/11/20 04:32:49 henoheno Exp $
+// $Id: html.php,v 1.15 2004/11/23 11:33:25 henoheno Exp $
//
// ËÜʸ¤ò½ÐÎÏ
return "<a href=\"$script?cmd=search&word=$r_page\">$s_page</a> ";
}
-// ¸«½Ð¤·¤òÀ¸À® (Ãí¼á¤äHTML¥¿¥°¤ò½üµî)
+// ¸«½Ð¤·¤òÀ¸À® (µÓÃí¤äHTML¥¿¥°¤ò½üµî)
function make_heading(& $str, $strip = TRUE)
{
global $NotePattern;
- // ¸«½Ð¤·¤Î¸ÇÍIDÉô¤òºï½ü
+ // Cut fixed-anchors
$id = '';
- if (preg_match('/^(\*{0,3})(.*?)\[#([A-Za-z][\w-]+)\](.*?)$/m', $str, $matches)) {
+ $matches = array();
+ if (preg_match('/^(\*{0,3})(.*?)\[#([a-z][a-f0-9]{7})\](.*?)$/m', $str, $matches)) {
$str = $matches[2] . $matches[4];
$id = $matches[3];
} else {
$str = preg_replace('/^\*{0,3}/', '', $str);
}
+ // Cut footnotes and tags
if ($strip === TRUE)
$str = strip_htmltag(make_link(preg_replace($NotePattern, '', $str)));