Merge pull request #2763 from esdrubal/mono-symbolicate-standalone2
[mono.git] / docs / exdoc
index 7ce4b9290cca64805d7655ad68b3d071c4d686ff..517956c3e6387b07137055ee91f9d5f64b62c09d 100644 (file)
@@ -63,6 +63,7 @@ $css
 EOF
        @a = split (/\n/, $files_content[$f]);
        $strikeextra = "";
+       $api_shown = 0;
        for ($ai = 0; $ai < $#a; $ai++){
            $line = $a[$ai];
            
@@ -134,14 +135,16 @@ EOF
        open HACKOUT, ">$dir/deploy/$name" || die "Could not open output";
 
        $line = 0;
+       $doprint = 0;
        while (<HACK>){
+           print HACKOUT $last if ($doprint);
            $line++;
            s/^\/\/<!\[CDATA\[//;
            s/^\/\/\]\]>\/\///;
 
            # Remove the junk <span> wrapper generated by AgilityPack
            if ($line==1){
-               s/<?span>//;
+               s/<span>//;
            }
            if (/<style type/){
                # Replace the CSS in the XHTML output with the original CSS
@@ -151,9 +154,13 @@ EOF
                    last if (/<\/style>/);
                }
            }
-
-           print HACKOUT $_;
+           $last = $_;
+           $doprint = 1;
+       }
+       if (!($last =~ /span/)){
+           print HACKOUT $last;
        }
+
        #system ("cp.exe $dir/html/$name $dir/deploy/$name");
     }
 }
@@ -171,7 +178,6 @@ sub process_doc {
        $body = "";
        $functions[$fn++] = $func;
        $deprecated = 0;
-       
        # Process arguments
        while (<>){
            s/NULL/<code>NULL<\/code>/g;
@@ -186,9 +192,9 @@ sub process_doc {
                    $returns =~ s/#(\w+)/<code>\1<\/code>/g;
                    $args =~ s/#(\w+)/<code>\1<\/code>/g;
 
-                   $returns =~ s/\`([:\w\*]+)\`/<code>\1<\/code>/g;
-                   $args =~ s/\`([:\w\*]+)\`/<code>\1<\/code>/g;
-                   $body =~ s/\`([:\w\*]+)\`/<code>\1<\/code>/g;
+                   $returns =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
+                   $args =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
+                   $body =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
                    
                    $body =~ s/\n/ /;
                    $bodies{$func} = $body;
@@ -210,7 +216,7 @@ sub process_doc {
                }
                chop;
                s/^\ \*//;
-               $_ = "\n<p>" if (/^\s+$/);
+               $_ = "<p>" if (/^\s*$/);
                                
                if ($inbody == 0){
                    if (/\s*(\w+):(.*)/){
@@ -223,6 +229,7 @@ sub process_doc {
                    } else {
                        
                        $body = "\t$_\n";
+
                        $inbody = 1;
                    }
                } elsif ($inbody == 1) {