2002-08-22 03:33:33 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
# this is really a faq2html and should only be used for this purpose
|
|
|
|
|
|
|
|
sub fixline {
|
2002-08-28 08:03:27 +00:00
|
|
|
# change blank lines to  
|
|
|
|
$_ =~ s/^\s*$/\ \n/g;
|
|
|
|
|
2002-08-22 03:33:33 +00:00
|
|
|
$_ =~ s/\</</g;
|
|
|
|
$_ =~ s/\>/>/g;
|
|
|
|
|
2003-03-19 20:22:39 +00:00
|
|
|
$_ =~ s/(http:\/\/([a-zA-Z0-9_.\#\/-]*)[^\) .\n])/\<a href=\"$1\"\>$1\<\/a\>/g;
|
2002-08-22 03:33:33 +00:00
|
|
|
|
|
|
|
$_ =~ s/(\\|\/)$/$1 /g; # clobber backslash on end of line
|
|
|
|
}
|
|
|
|
|
|
|
|
while(<STDIN>) {
|
|
|
|
fixline($_);
|
|
|
|
push @p, "$_";
|
|
|
|
}
|
|
|
|
|
|
|
|
print "<pre>\n";
|
|
|
|
print @p;
|
|
|
|
print "</pre>\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|