blob: 43c7fffa2755a5ff9e60ed4c78c5f738eff8ef5f (
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
|
#!/usr/bin/perl
# this is really a faq2html and should only be used for this purpose
sub fixline {
# change blank lines to  
$_ =~ s/^\s*$/\ \n/g;
$_ =~ s/\</</g;
$_ =~ s/\>/>/g;
$_ =~ s/(http:\/\/([a-zA-Z0-9_.\/-]*)[^\) .\n])/\<a href=\"$1\"\>$1\<\/a\>/g;
$_ =~ s/(\\|\/)$/$1 /g; # clobber backslash on end of line
}
while(<STDIN>) {
fixline($_);
push @p, "$_";
}
print "<pre>\n";
print @p;
print "</pre>\n";
|