add missing files
[mono.git] / web / web / htmlify
index 26af22ec3d0fef72f0248970ded6d5268ac8b8fc..cd347cad09f7bed5d5519b40431d061299a5d7e8 100644 (file)
@@ -2,19 +2,30 @@
 $q = 1;
 
 while (<>){
-       chop;
+       chomp;
        if (/^\* (.*)$/){
                print "<h1>$1</h1>\n";
        } elsif (/^\*\* (.*)$/) {
-               print "<h2>$1</h2>\n";
+               print "<h3>$1</h3>\n";
        } elsif (/^\*\*\* (.*)$/) {
                print "<h3>$1</h3>\n";
+       } elsif (/^\*\*\*\* (.*)$/) {
+               print "<h4>$1</h4>\n";
        } elsif (/^$/) {
-               print "<p>\n";
+               print "<p>$1</p>\n";
        } elsif (/^\t\t\* (.*)$/) {
-               print "<li>$1\n";
+               print "<li>$1</li>\n";
+       } elsif (/^\@item (.*)$/){
+               $name = $link = $1;
+               $link =~ s/ //g;
+               print "<a name=\"$link\">\n";
+               if (/Beta 1/){
+                   print "<h2>$name</h2>\n";
+               } else {
+                   print "<h3>$name</h3>\n";
+               }
        } elsif (/^Q: (.*)$/){
-               print "<p><a name=\"q$q\"><b>Question $q:</b> $1\n";
+               print "<p><a name=\"q$q\"></a><b>Question $q:</b> $1\n";
                $q++;
        } elsif (/^A: (.*)$/){
                print "$1\n";