Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't mess up with absolute links
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 19 Jul 2006 12:08:57 +0000 (12:08 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 19 Jul 2006 12:08:57 +0000 (12:08 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2620 48e7efb5-ca39-0410-a469-dd3cf9ba447f

tools/doxygen/index_php.pl

index ed777a5..567b95a 100755 (executable)
@@ -38,11 +38,14 @@ while(defined($line=<FILE>)) {
 }
 close FILE;
 
 }
 close FILE;
 
-$onglets =~ s/href=\"/href=\"doc\//gi;
-$onglets =~ s/src=\"/src=\"doc\//gi;
+# (?!http) : A zero-width negative look-ahead assertion. 
+# For example "/foo(?!bar)/" matches any occurrence of "foo" that isn’t followed by "bar".
 
 
-$body =~ s/href=\"/href=\"doc\//gi;
-$body =~ s/src=\"/src=\"doc\//gi;
+$onglets =~ s/href=\"(?!http)/href=\"doc\//gi;
+$onglets =~ s/src=\"(?!http)/src=\"doc\//gi;
+
+$body =~ s/href=\"(?!http)/href=\"doc\//gi;
+$body =~ s/src=\"(?!http)/src=\"doc\//gi;
 
 open FILE,$inputphp;
 open OUTPUT,"> $output";
 
 open FILE,$inputphp;
 open OUTPUT,"> $output";