Skip to content

Commit 5c71f7f

Browse files
committed
add TIME token type, see issue #873
1 parent e033ae2 commit 5c71f7f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/lib_annot.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ private function _from_token($token, $force_unknown, $force_include_init, $restr
255255
$this->parses[] = new MorphParse($token, array(array('inner' => 'PNCT')));
256256
} elseif (preg_match('/^\p{Nd}+[\.,]?\p{Nd}*$/u', $token)) {
257257
$this->parses[] = new MorphParse($token, array(array('inner' => 'NUMB')));
258+
} elseif (preg_match('/^([01][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$/u', $token)) {
259+
$this->parses[] = new MorphParse($token, array(array('inner' => 'TIME')));
258260
} elseif (preg_match('/^[\p{Latin}\.-]+$/u', $token)) {
259261
$this->parses[] = new MorphParse($token, array(array('inner' => 'LATN')));
260262
} elseif (preg_match('/^\p{S}+$/u', $token)) {

0 commit comments

Comments
 (0)