ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/Switcher.pm
(Generate patch)

Comparing COMP/SCRAM/src/ActiveDoc/Switcher.pm (file contents):
Revision 1.15 by williamc, Mon Aug 28 07:43:21 2000 UTC vs.
Revision 1.16 by williamc, Tue Nov 14 15:20:55 2000 UTC

# Line 149 | Line 149 | sub _checkchar {
149  
150          # ---- In a tag
151          if ( $self->{tagcontext}=~/tag/ ) {
152 +           $self->{tagbuff}=$self->{tagbuff}.$char;
153             if ( ! $self->_quotetest($char) ) {
154              if ( ! $self->_labeltest($char) ) {
155               if ( $char eq ">") { $self->_closetag(); }
# Line 195 | Line 196 | sub _opentag {
196  
197          # Do we have an opening or closing tag?
198          if ( ($char=$self->_nextchar()) eq "/" ) { #we have a closing tag
199 +          $self->{tagbuff}="<".$char;
200            $self->{tagcontext}="endtag";
201          }
202          else { # an opening tag
203 +          $self->{tagbuff}="<";
204            $self->{tagcontext}="starttag";
205            $self->_checkchar($char);
206          }
# Line 395 | Line 398 | sub _closelabel {
398              ($self->{tagname}=$self->_getstore())=~tr/A-Z/a-z/;
399           }
400           else {
401 <            die ">Tag syntax error in $self->{tagname} on line ".
402 <                $self->line()." of file \n$self->{filename}";
401 >            # do not die anymore - breaks non tag documents
402 >            #die ">Tag syntax error in $self->{tagname} on line ".
403 >            #   $self->line()." of file \n$self->{filename}";
404 >            # -- assume that this is plain text
405 >            $self->{tagcontext}="text";
406 >            $self->_resetstore();
407 >            $self->_unshiftstore($self->{tagbuff});
408 >            $self->{tagbuff}="";
409 >            return;
410           }
411          }
412          $self->_resetstore();
# Line 412 | Line 422 | sub _putstore() {
422          $self->{stringbuff}=$self->{stringbuff}.$char;
423   }
424  
425 + sub _unshiftstore() {
426 +        my $self=shift;
427 +        my $char=shift;
428 +
429 +        $self->{stringbuff}=$char.$self->{stringbuff};
430 + }
431 +
432   sub _getstore() {
433          my $self=shift;
434  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines