comparison admin/get_contents @ 2683:9da47715addc octave-forge

HTML is more standard compliant
author hauberg
date Sat, 14 Oct 2006 16:44:15 +0000
parents e795ebd07acd
children 6f8353d6a45b
comparison
equal deleted inserted replaced
2682:3f938458f716 2683:9da47715addc
112 text_bullet_list_to_HTML(\@c); 112 text_bullet_list_to_HTML(\@c);
113 m{^(.*)/(.*?)$}; # match directory and file's basename 113 m{^(.*)/(.*?)$}; # match directory and file's basename
114 my $dir = $1; 114 my $dir = $1;
115 my $file = $2; 115 my $file = $2;
116 $dir =~ s{^\./}{}; # strip leading ./ 116 $dir =~ s{^\./}{}; # strip leading ./
117 print README "\t<li> <b><tt>$dir/</tt></b><br>\n"; 117 print README "\t<li> <b><tt>$dir/</tt></b><br/>\n";
118 foreach my $line (@c) { 118 foreach my $line (@c) {
119 # use fixed font for words that end with / 119 # use fixed font for words that end with /
120 # (ie, directory names). 120 # (ie, directory names).
121 $line =~ s{\s(\S+/)([.,\s])}{ <tt>$1</tt>$2}g; 121 $line =~ s{\s(\S+/)([.,\s])}{ <tt>$1</tt>$2}g;
122 print README "\t$line"; 122 print README "\t$line";
123 } 123 }
124 print README "\n"; 124 print README "</li>\n";
125 } 125 }
126 $added_contents = 1; 126 $added_contents = 1;
127 } else { 127 } else {
128 print README $t; 128 print README $t;
129 } 129 }