function make_heading(&$str, $strip = TRUE)
 {
     $NotePattern = PukiWikiConfig::getParam('NotePattern');
     // 見出しの固有ID部を削除
     $id = '';
     if (preg_match('/^(\\*{0,6})(.*?)\\[#([A-Za-z][\\w-]+)\\](.*?)$/m', $str, $matches)) {
         $str = $matches[2] . $matches[4];
         $id = $matches[3];
     } else {
         $str = preg_replace('/^\\*{0,6}/', '', $str);
     }
     if ($strip) {
         $str = PukiWikiFunc::strip_htmltag(PukiWikiFunc::make_link(preg_replace($NotePattern, '', $str)));
     }
     return $id;
 }