/[webpac]/trunk/back2html.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/back2html.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 78 by dpavlin, Sat Jul 5 22:03:21 2003 UTC revision 79 by dpavlin, Sun Jul 6 13:03:35 2003 UTC
# Line 8  sub back2html { Line 8  sub back2html {
8          my $html = shift;          my $html = shift;
9    
10          my $out;          my $out;
11          foreach $line (split(/###/,$html)) {          foreach $line (split(/\s*###\s*/,$html)) {
12                  $out .= "<tr><td>";                  $out .= "<tr><td valign=\"top\">";
13                  my @items = split(/#-#/,$line);                  my @items = split(/\s*#-#\s*/,$line);
14                    # convert spaces in left field to non-breaking spaces
15                    $items[0] =~ s#\s+#&nbsp;#g;
16                    # try to make link on right field
17                  if ($items[1] =~ m#(http://[\S]+)\s*.*?#i) {                  if ($items[1] =~ m#(http://[\S]+)\s*.*?#i) {
18                          # chop URLS longer than 60 characters                          # chop URLS longer than 60 characters
19                          my $url = substr($1,0,60);                          my $url = substr($1,0,60);

Legend:
Removed from v.78  
changed lines
  Added in v.79

  ViewVC Help
Powered by ViewVC 1.1.26