X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=lib%2Ffile.php;fp=lib%2Ffile.php;h=597b5fc1c2f0adb555626d6c7123943c3d0a2efc;hb=93795e62c389822fda2aaa15d63d1c236f4fa456;hp=34a2f3ec2e6a9a421028d5051005e8909faa496d;hpb=8754850dad3444a7de156b6aafdb12b0a133bd51;p=pukiwiki%2Fpukiwiki.git diff --git a/lib/file.php b/lib/file.php index 34a2f3e..597b5fc 100644 --- a/lib/file.php +++ b/lib/file.php @@ -204,6 +204,18 @@ function remove_author_info($wikitext) return preg_replace('/^\s*#author\([^\n]*(\n|$)/m', '', $wikitext); } +function remove_author_lines($lines) +{ + $author_head = '#author('; + $len = strlen($author_head); + for ($i = 0; $i < 5; $i++) { + if (substr($lines[$i], 0, $len) === $author_head) { + unset($lines[$i]); + } + } + return $lines; +} + function get_date_atom($timestamp) { // Compatible with DATE_ATOM format