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

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

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

revision 1.111 by wakaba, Sat Aug 30 12:33:36 2008 UTC revision 1.112 by wakaba, Sat Aug 30 14:37:46 2008 UTC
# Line 3122  $Element->{$HTML_NS}->{time} = { Line 3122  $Element->{$HTML_NS}->{time} = {
3122        $input_node = $attr;        $input_node = $attr;
3123      } else {      } else {
3124        $input = $item->{node}->text_content;        $input = $item->{node}->text_content;
3125        $reg_sp = qr/\p{Zs}*/;        $reg_sp = qr/\p{WhiteSpace}*/;
3126        $input_node = $item->{node};        $input_node = $item->{node};
3127    
3128        ## ISSUE: What is the definition for "successfully extracts a date        ## ISSUE: What is the definition for "successfully extracts a date
# Line 3135  $Element->{$HTML_NS}->{time} = { Line 3135  $Element->{$HTML_NS}->{time} = {
3135      my $second;      my $second;
3136      if ($input =~ /      if ($input =~ /
3137        \A        \A
3138        [\x09-\x0D\x20]*        $reg_sp
3139        ([0-9]+) # 1        ([0-9]+) # 1
3140        (?>        (?>
3141          -([0-9]+) # 2          -([0-9]+) # 2
3142          -([0-9]+) # 3          -((?>[0-9]+)) # 3 # Use (?>) such that yyyy-mm-ddhh:mm does not match
3143          [\x09-\x0D\x20]*          $reg_sp
3144          (?>          (?>
3145            T            T
3146            [\x09-\x0D\x20]*            $reg_sp
3147          )?          )?
3148          ([0-9]+) # 4          ([0-9]+) # 4
3149          :([0-9]+) # 5          :([0-9]+) # 5
3150          (?>          (?>
3151            :([0-9]+(?>\.[0-9]*)?|\.[0-9]*) # 6            :([0-9]+(?>\.[0-9]*)?|\.[0-9]*) # 6
3152          )?          )?
3153          [\x09-\x0D\x20]*          $reg_sp
3154          (?>          (?>
3155            Z            Z
3156            [\x09-\x0D\x20]*            $reg_sp
3157          |          |
3158            [+-]([0-9]+):([0-9]+) # 7, 8            [+-]([0-9]+):([0-9]+) # 7, 8
3159            [\x09-\x0D\x20]*            $reg_sp
3160          )?          )?
3161          \z          \z
3162        |        |
# Line 3164  $Element->{$HTML_NS}->{time} = { Line 3164  $Element->{$HTML_NS}->{time} = {
3164          (?>          (?>
3165            :([0-9]+(?>\.[0-9]*)?|\.[0-9]*) # 10            :([0-9]+(?>\.[0-9]*)?|\.[0-9]*) # 10
3166          )?          )?
3167          [\x09-\x0D\x20]*\z          $reg_sp
3168            \z
3169        )        )
3170      /x) {      /x) {
3171        if (defined $2) { ## YYYY-MM-DD T? hh:mm        if (defined $2) { ## YYYY-MM-DD T? hh:mm

Legend:
Removed from v.1.111  
changed lines
  Added in v.1.112

[email protected]
ViewVC Help
Powered by ViewVC 1.1.24