unicode: one set of barb arrows from unicode 7.0
[sheet.git] / source.plp
index 43fddb635f7e340801a89525f61861bdb69a6a22..358bf8475f7355eecc190b76399483aa69d92f18 100644 (file)
@@ -43,13 +43,18 @@ Html({
 
 say '';
 
-if (not $source) {
-       print "<h1>Source files</h1>";
+if (not $source or -d $source) {
+       PLP_START {
+               print "<h1>Source files</h1>";
+       };
+
+       if ($source and $source ne 'tools') {
+               Abort("Directory index not permitted", '403 source not allowed');
+       }
 
        print "<p>Project code distributed under the AGPL. Please contribute back.</p>";
        say '<ul>';
-       for (glob '*.plp') {
-               chomp;
+       for (glob($source ? "$source/*" : '*.plp')) {
                say '<li>', showlink($_, "/source/$_");
        }
        say "</ul>\n";
@@ -99,6 +104,7 @@ else {
                        Statement => 'strong',
                        Error     => 'em',
                        Todo      => 'em',
+                       PreProc   => 'strong',
                );
 
                say '<pre>';