cfgparse: be forgiving about a missing "ms" after a duration

While it’s certainly better and clearer to specify it, we should do the
right thing when the unit is missing, just like CSS for example
(margin: 0; is okay, margin: 0px; too).
This commit is contained in:
Michael Stapelberg 2012-09-22 14:21:35 +02:00
parent 66d786762a
commit c69fba3662

View File

@ -1057,7 +1057,8 @@ word_or_number:
; ;
duration: duration:
NUMBER TOK_TIME_MS { sasprintf(&$$, "%d", $1); } NUMBER { sasprintf(&$$, "%d", $1); }
| NUMBER TOK_TIME_MS { sasprintf(&$$, "%d", $1); }
; ;
mode: mode: