Permalink
Browse files

Add zerofix filter that acts like the zerofix option some tags support:

it removes leading zeroes.
  • Loading branch information...
1 parent 28f61c6 commit d9c3663047a5f449dd6a79ae2840aa5086f82e9d @jonjensen jonjensen committed Jan 2, 2003
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/Vend/Interpolate.pm
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.140 2002-12-31 14:09:26 ramoore Exp $
+# $Id: Interpolate.pm,v 2.141 2003-01-02 22:41:31 jon Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -27,7 +27,7 @@ package Vend::Interpolate;
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.140 $, 10);
+$VERSION = substr(q$Revision: 2.141 $, 10);
@EXPORT = qw (
@@ -1218,6 +1218,10 @@ sub tag_data {
return $val;
},
+ zerofix => sub {
+ $_[0] =~ /^0*(.*)/; return $1;
+ },
+
);
$Filter{upper} = $Filter{uc};

0 comments on commit d9c3663

Please sign in to comment.