[Templates-cvs] cvs commit: Template2 TODO
cvs@template-toolkit.org
cvs@template-toolkit.org
cvs 06/05/25 08:22:33
Modified: . TODO
Log:
Applied Paul Seamon's CHOMP patch
Revision Changes Path
2.82 +25 -1 Template2/TODO
Index: TODO
===================================================================
RCS file: /template-toolkit/Template2/TODO,v
retrieving revision 2.81
retrieving revision 2.82
diff -u -r2.81 -r2.82
--- TODO 2006/01/30 20:02:49 2.81
+++ TODO 2006/05/25 08:22:33 2.82
@@ -11,7 +11,7 @@
# Andy Wardley <abw@wardley.org>
#
#------------------------------------------------------------------------
-# $Id: TODO,v 2.81 2006/01/30 20:02:49 abw Exp $
+# $Id: TODO,v 2.82 2006/05/25 08:22:33 abw Exp $
#========================================================================
#------------------------------------------------------------------------
@@ -722,3 +722,27 @@
[% tt2.ps.require.mm = 1 %] # either
[% tt2.ps.require('mm', 'simple') %] # or
+
+
+
+
+------------------------------------------------------------------------
+-------------------------------------------------------
+my $replace_has_backref;
+while ($replace =~ m/(\\*) \$\d+/gx) {
+ if (length($1 || '') % 2 == 0) {
+ $replace_has_backref = 1;
+ last;
+ }
+}
+
+if (!$replace_has_backref) {
+ if ($global) {
+ $text =~ s/$pattern/$replace/g;
+ } else {
+ $text =~ s/$pattern/$replace/;
+ }
+ return $text;
+}
+-------------------------------------------------------
+