[LON-CAPA-cvs] cvs: modules /gerd/Wiki convert.pl
www
www at source.lon-capa.org
Tue Dec 13 20:15:56 EST 2011
www Wed Dec 14 01:15:56 2011 EDT
Modified files:
/modules/gerd/Wiki convert.pl
Log:
Follow redirections and unescape title
Index: modules/gerd/Wiki/convert.pl
diff -u modules/gerd/Wiki/convert.pl:1.4 modules/gerd/Wiki/convert.pl:1.5
--- modules/gerd/Wiki/convert.pl:1.4 Tue Dec 13 22:39:39 2011
+++ modules/gerd/Wiki/convert.pl Wed Dec 14 01:15:56 2011
@@ -13,7 +13,8 @@
my $currentdir='';
while (my $line=<IN>) {
chomp($line);
- my ($res)=($line=~/title=\\\"([^\\]+)\\/);
+ my ($res)=($line=~/title=\\\"([^\"]+)\"/);
+ $res=~s/\\//g;
if ($res=~/\s[\-\–]+\s/) {
my ($dir,$remainder)=split(/\s+[\-\–]+\s+/,$res);
$dir=~s/\W//g;
@@ -89,6 +90,7 @@
my $oldref=$idxres{$idx};
# Changing $oldref to $redir
$residx{$oldref}=$residx{$redir};
+ $resdir{$oldref}=$resdir{$redir};
}
# No need to visit this file again
delete $idxres{$idx};
More information about the LON-CAPA-cvs
mailing list