Fix b&w LCD targets.
[maemo-rb.git] / www / txt2html.pl
blob5a532cdeadeced4541a8966d3211774a397fc5e7
1 #!/usr/bin/perl
3 # this is really a faq2html and should only be used for this purpose
5 sub fixline {
6 # change blank lines to &nbsp
7 $_ =~ s/^\s*$/\ \n/g;
9 $_ =~ s/\</&lt;/g;
10 $_ =~ s/\>/&gt;/g;
12 $_ =~ s/(http:\/\/([a-zA-Z0-9_.\#\/-\?\&]*)[^\) .\n])/\<a href=\"$1\"\>$1\<\/a\>/g;
14 $_ =~ s/(\\|\/)$/$1&nbsp;/g; # clobber backslash on end of line
17 while(<STDIN>) {
18 fixline($_);
19 push @p, "$_";
22 print "<pre>\n";
23 print @p;
24 print "</pre>\n";