# HG changeset patch # User Mikael Berthe # Date 1328725835 -3600 # Node ID 100a831f4f1242b70964157006d6bc25524606f8 # Parent a7c6c2b3454b06b32c17aa8cb947e777a80dbf16 Fix tvcal module diff -r a7c6c2b3454b -r 100a831f4f12 mcbot/cmds/tvcal.lua --- a/mcbot/cmds/tvcal.lua Sun Oct 23 14:10:39 2011 +0200 +++ b/mcbot/cmds/tvcal.lua Wed Feb 08 19:30:35 2012 +0100 @@ -33,16 +33,18 @@ end local tabregex = '%s*\n%s*'.. - '(.-)
' + '.-%s*\n%s*'.. + '(.-)' for day, tab in string.gmatch(contents, tabregex) do local epregex local d, m, y = day:match("^(%d+)_(%d+)_(%d%d%d%d)$") day = string.format("%04d-%02d-%02d", y, m, d) - epregex = '([^<]+)' - epregex = epregex .. '
' - epregex = epregex .. '([^<]+)[%s\n]*' + epregex = '' local shows = {} for name, ep in string.gmatch(tab, epregex) do