Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

it removes leading zeroes.
  • Loading branch information...
commit d9c3663047a5f449dd6a79ae2840aa5086f82e9d 1 parent 28f61c6
@jonjensen jonjensen authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/Vend/Interpolate.pm
View
8 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};
Please sign in to comment.
Something went wrong with that request. Please try again.