X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=index.php;h=9bdeceaaccb438c086de2c55882072f6dbe43125;hb=40ca11bb6f346249618e20dfc8aa4d23226abaa3;hp=7ae8e478efa5eac7432ab39c0d68dd2e4b524cd4;hpb=f60062deb36b708d1b28b0e264957562b06964f3;p=mdref%2Fmdref
diff --git a/index.php b/index.php
index 7ae8e47..9bdecea 100644
--- a/index.php
+++ b/index.php
@@ -154,15 +154,12 @@ function ml($file) {
if (is_dir($dir)) {
printf("
Functions:
\n");
printf("\n");
- foreach (scandir($dir) as $file) {
- if ($file{0} === "." || !is_file("$dir/$file") || ctype_upper($file{0})) {
- continue;
- }
+ foreach (glob("$dir/[_a-z]*.md") as $file) {
printf("%s
%s
\n",
urlpath($dir, $file),
basename($file, ".md"),
- @end(head("$dir/$file", 3)),
- join(" ", cut(head("$dir/$file"), ["f"=>"1-"]))
+ @end(head($file, 3)),
+ join(" ", cut(head($file), ["f"=>"1-"]))
);
}
printf("
\n");
@@ -173,15 +170,12 @@ function ml($file) {
if (is_dir($dir)) {
printf("Methods:
\n");
printf("\n");
- foreach (scandir($dir) as $file) {
- if ($file{0} === "." || !is_file("$dir/$file") || ctype_upper($file{0})) {
- continue;
- }
+ foreach (glob("$dir/[_a-z]*.md") as $file) {
printf("%s
%s
\n",
urlpath($dir, $file),
basename($file, ".md"),
- @end(head("$dir/$file", 3)),
- join(" ", cut(head("$dir/$file"), ["f"=>"1-"]))
+ @end(head($file, 3)),
+ join(" ", cut(head($file), ["f"=>"1-"]))
);
}
printf("
\n");
@@ -263,12 +257,29 @@ ob_start($s);
+
+
+
+
+
+