# HG changeset patch # User Matthew Wild # Date 1245623065 -3600 # Node ID 983f96ebef0806ccaf79af991693e8a6d677025f # Parent 1db3ee8b9bc313bf6f60bb5b73c9b6ace570f7d0 Make prefix phrases to the times of day optional again, to satisfy the tests diff -r 1db3ee8b9bc3 -r 983f96ebef08 ndp.lua --- a/ndp.lua Sun Jun 21 23:20:54 2009 +0100 +++ b/ndp.lua Sun Jun 21 23:24:25 2009 +0100 @@ -147,7 +147,7 @@ time = time + seconds_in_a[unit] * number; end }; - { lpeg.one_of{"this ", "in the ", "at "} * time_of_day / + { (lpeg.one_of{"this ", "in the ", "at "} + true)* time_of_day / function (time_of_day) time_of_day = time_of_day:match("%S+$");