[Templates-cvs] cvs commit: TT3/lib/Template/TT3 Scanner.pm

cvs@template-toolkit.org cvs@template-toolkit.org
Wed, 10 Dec 2003 15:13:22 +0000


cvs         03/12/10 15:13:20

  Modified:    lib/Template/TT3 Scanner.pm
  Log:
  * changed final block of scan() to match .+ rather than .* to prevent
    empty final text item being added to document.
  
  Revision  Changes    Path
  1.2       +4 -4      TT3/lib/Template/TT3/Scanner.pm
  
  Index: Scanner.pm
  ===================================================================
  RCS file: /template-toolkit/TT3/lib/Template/TT3/Scanner.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Scanner.pm	2003/12/10 14:16:01	1.1
  +++ Scanner.pm	2003/12/10 15:13:20	1.2
  @@ -18,7 +18,7 @@
   #   modify it under the same terms as Perl itself.
   #
   # REVISION
  -#   $Id: Scanner.pm,v 1.1 2003/12/10 14:16:01 abw Exp $
  +#   $Id: Scanner.pm,v 1.2 2003/12/10 15:13:20 abw Exp $
   #
   #========================================================================
   
  @@ -30,7 +30,7 @@
   use vars qw( $VERSION $DEBUG $ERROR $WARNING $TAGS );
   use base qw( Template::TT3::Base );
   
  -$VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);
  +$VERSION = sprintf("%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/);
   $DEBUG   = 0 unless defined $DEBUG;
   $ERROR   = '';
   $TAGS    = [ ];
  @@ -214,7 +214,7 @@
           }
       }
   
  -    if ($$textref =~ / \G (.*) /sx) {
  +    if ($$textref =~ / \G (.+) /sx) {
           my $text = $1;
           $document->text(\$text) 
               || return $self->error($document->error());
  @@ -254,7 +254,7 @@
   
   =head1 VERSION
   
  -$Revision: 1.1 $
  +$Revision: 1.2 $
   
   =head1 COPYRIGHT