[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Sat Oct 6 02:42:00 2001
User: heins
Date: 2001-10-06 06:41:11 GMT
Modified: lib/Vend Interpolate.pm
Log:
* Fix the fact I forgot to update before committing. This dual-branch
stuff is confusing....I am about to stop merging changes to stable
unless it is a bug fix only.
Revision Changes Path
2.15 +10 -5 interchange/lib/Vend/Interpolate.pm
rev 2.15, prev_rev 2.14
Index: Interpolate.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.14
retrieving revision 2.15
diff -u -r2.14 -r2.15
--- Interpolate.pm 2001/10/06 06:26:46 2.14
+++ Interpolate.pm 2001/10/06 06:41:10 2.15
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.14 2001/10/06 06:26:46 mheins Exp $
+# $Id: Interpolate.pm,v 2.15 2001/10/06 06:41:10 mheins Exp $
#
# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
#
@@ -27,7 +27,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.14 $, 10);
+$VERSION = substr(q$Revision: 2.15 $, 10);
@EXPORT = qw (
@@ -458,11 +458,11 @@
$Vend::Cfg->{ImageDir};
if ($dir) {
- $$text =~ s#(<i\w+\s+[^>]*?src=")(?!https?:)([^/][^"]+)#
+ $$text =~ s#(<i\w+\s+[^>]*?src=")(?!\w+:)([^/][^"]+)#
$1 . $dir . $2#ige;
- $$text =~ s#(<body\s+[^>]*?background=")(?!https?:)([^/][^"]+)#
+ $$text =~ s#(<body\s+[^>]*?background=")(?!\w+:)([^/][^"]+)#
$1 . $dir . $2#ige;
- $$text =~ s#(<t(?:[dhr]|able)\s+[^>]*?background=")(?!https?:)([^/][^"]+)#
+ $$text =~ s#(<t(?:[dhr]|able)\s+[^>]*?background=")(?!\w+:)([^/][^"]+)#
$1 . $dir . $2#ige;
}
}
@@ -624,6 +624,11 @@
@args = ();
if(/%/) {
$value = sprintf($_, $value);
+ next;
+ }
+ if (/^(\d+)(\.?)$/) {
+ substr($value, $1) = $2 ? '...' : ''
+ if length($value) > $1;
next;
}
while( s/\.([^.]+)$//) {