Welcome to mirror list, hosted at ThFree Co, Russian Federation.

htmlify « web « doc - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e4e61961f3b90c024164a8b7dfb72c61b4cd2d33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/perl
$q = 1;

while (<>){
	chop;
	if (/^\* (.*)$/){
		print "<h1>$1</h1>\n";
	} elsif (/^\*\* (.*)$/) {
		print "<h2>$1</h2>\n";
	} elsif (/^\*\*\* (.*)$/) {
		print "<h3>$1</h3>\n";
	} elsif (/^\*\*\*\* (.*)$/) {
		print "<h4>$1</h4>\n";
	} elsif (/^$/) {
		print "<p>\n";
	} elsif (/^\t\t\* (.*)$/) {
		print "<li>$1\n";
	} elsif (/^\@item (.*)$/){
	        $name = $link = $1;
		$link =~ s/ //g;
	        print "<a name=\"$link\">\n";
	        print "<h2>$name</h2>\n";
	} elsif (/^Q: (.*)$/){
		print "<p><a name=\"q$q\"></a><b>Question $q:</b> $1\n";
		$q++;
	} elsif (/^A: (.*)$/){
		print "$1\n";
	} elsif (/^TODO=(.*),$/){
	        print "<a name=\"$1\">\n";
        } else {
		print "$_\n";
	}
}