/[suikacvs]/markup/html/whatpm/Whatpm/HTML/Tokenizer.pm
Suika

Diff of /markup/html/whatpm/Whatpm/HTML/Tokenizer.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by wakaba, Tue Oct 14 05:34:05 2008 UTC revision 1.4 by wakaba, Tue Oct 14 11:46:57 2008 UTC
# Line 541  sub _get_next_token ($) { Line 541  sub _get_next_token ($) {
541                        
542            $self->{ct}            $self->{ct}
543              = {type => START_TAG_TOKEN,              = {type => START_TAG_TOKEN,
544                 tag_name => chr ($self->{nc} + 0x0020),                 tag_name => chr ($self->{nc} + ($self->{is_xml} ? 0 : 0x0020)),
545                 line => $self->{line_prev},                 line => $self->{line_prev},
546                 column => $self->{column_prev}};                 column => $self->{column_prev}};
547            $self->{state} = TAG_NAME_STATE;            $self->{state} = TAG_NAME_STATE;
# Line 660  sub _get_next_token ($) { Line 660  sub _get_next_token ($) {
660                    
661          $self->{ct}          $self->{ct}
662              = {type => END_TAG_TOKEN,              = {type => END_TAG_TOKEN,
663                 tag_name => chr ($self->{nc} + 0x0020),                 tag_name => chr ($self->{nc} + ($self->{is_xml} ? 0 : 0x0020)),
664                 line => $l, column => $c};                 line => $l, column => $c};
665          $self->{state} = TAG_NAME_STATE;          $self->{state} = TAG_NAME_STATE;
666                    
# Line 851  sub _get_next_token ($) { Line 851  sub _get_next_token ($) {
851        } elsif (0x0041 <= $self->{nc} and        } elsif (0x0041 <= $self->{nc} and
852                 $self->{nc} <= 0x005A) { # A..Z                 $self->{nc} <= 0x005A) { # A..Z
853                    
854          $self->{ct}->{tag_name} .= chr ($self->{nc} + 0x0020);          $self->{ct}->{tag_name}
855                .= chr ($self->{nc} + ($self->{is_xml} ? 0 : 0x0020));
856            # start tag or end tag            # start tag or end tag
857          ## Stay in this state          ## Stay in this state
858                    
# Line 973  sub _get_next_token ($) { Line 974  sub _get_next_token ($) {
974                 $self->{nc} <= 0x005A) { # A..Z                 $self->{nc} <= 0x005A) { # A..Z
975                    
976          $self->{ca}          $self->{ca}
977              = {name => chr ($self->{nc} + 0x0020),              = {name => chr ($self->{nc} + ($self->{is_xml} ? 0 : 0x0020)),
978                 value => '',                 value => '',
979                 line => $self->{line}, column => $self->{column}};                 line => $self->{line}, column => $self->{column}};
980          $self->{state} = ATTRIBUTE_NAME_STATE;          $self->{state} = ATTRIBUTE_NAME_STATE;
# Line 1134  sub _get_next_token ($) { Line 1135  sub _get_next_token ($) {
1135        } elsif (0x0041 <= $self->{nc} and        } elsif (0x0041 <= $self->{nc} and
1136                 $self->{nc} <= 0x005A) { # A..Z                 $self->{nc} <= 0x005A) { # A..Z
1137                    
1138          $self->{ca}->{name} .= chr ($self->{nc} + 0x0020);          $self->{ca}->{name}
1139                .= chr ($self->{nc} + ($self->{is_xml} ? 0 : 0x0020));
1140          ## Stay in the state          ## Stay in the state
1141                    
1142      if ($self->{char_buffer_pos} < length $self->{char_buffer}) {      if ($self->{char_buffer_pos} < length $self->{char_buffer}) {
# Line 1278  sub _get_next_token ($) { Line 1280  sub _get_next_token ($) {
1280                 $self->{nc} <= 0x005A) { # A..Z                 $self->{nc} <= 0x005A) { # A..Z
1281                    
1282          $self->{ca}          $self->{ca}
1283              = {name => chr ($self->{nc} + 0x0020),              = {name => chr ($self->{nc} + ($self->{is_xml} ? 0 : 0x0020)),
1284                 value => '',                 value => '',
1285                 line => $self->{line}, column => $self->{column}};                 line => $self->{line}, column => $self->{column}};
1286          $self->{state} = ATTRIBUTE_NAME_STATE;          $self->{state} = ATTRIBUTE_NAME_STATE;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24