Make prefix phrases to the times of day optional again, to satisfy the tests

Sun, 21 Jun 2009 23:24:25 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 21 Jun 2009 23:24:25 +0100
changeset 21
983f96ebef08
parent 20
1db3ee8b9bc3
child 22
707793a758c4

Make prefix phrases to the times of day optional again, to satisfy the tests

ndp.lua file | annotate | diff | comparison | revisions
--- 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+$");
 

mercurial