[interchange-cvs] interchange - kwalsh modified
code/Filter/space2nbsp.filter
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Thu Feb 22 15:42:51 EST 2007
User: kwalsh
Date: 2007-02-22 20:42:51 GMT
Modified: code/Filter space2nbsp.filter
Log:
* Code made more efficient.
Revision Changes Path
1.2 +4 -3 interchange/code/Filter/space2nbsp.filter
rev 1.2, prev_rev 1.1
Index: space2nbsp.filter
===================================================================
RCS file: /var/cvs/interchange/code/Filter/space2nbsp.filter,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- space2nbsp.filter 16 Feb 2007 22:29:20 -0000 1.1
+++ space2nbsp.filter 22 Feb 2007 20:42:51 -0000 1.2
@@ -1,13 +1,14 @@
# Copyright 2002-2007 Interchange Development Group (http://www.icdevgroup.org/)
# Licensed under the GNU GPL v2. See file LICENSE for details.
-# $Id: space2nbsp.filter,v 1.1 2007/02/16 22:29:20 docelic Exp $
+# $Id: space2nbsp.filter,v 1.2 2007/02/22 20:42:51 kwalsh Exp $
CodeDef space2nbsp Filter
-CodeDef space2nbsp Description All SPACE to nbsp
+CodeDef space2nbsp Description All SPACES to nbsp
CodeDef space2nbsp Routine <<EOR
sub {
my $str = shift;
- $str =~ s/( +)/' ' x length($1)/emg;
+
+ $str =~ s/ / /g;
return $str;
}
EOR
More information about the interchange-cvs
mailing list