From fddd9ced0932a94d5f61960e520d58a44ba41d76 Mon Sep 17 00:00:00 2001 From: mquinson Date: Wed, 19 Jul 2006 12:08:57 +0000 Subject: [PATCH] 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 --- tools/doxygen/index_php.pl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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"; -- 2.20.1