From: mquinson Date: Wed, 19 Jul 2006 12:08:57 +0000 (+0000) Subject: Don't mess up with absolute links X-Git-Tag: v3.3~2739 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fddd9ced0932a94d5f61960e520d58a44ba41d76?ds=sidebyside Don't mess up with absolute links git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2620 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/tools/doxygen/index_php.pl b/tools/doxygen/index_php.pl index ed777a569e..567b95a1a6 100755 --- a/tools/doxygen/index_php.pl +++ b/tools/doxygen/index_php.pl @@ -38,11 +38,14 @@ while(defined($line=)) { } 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";