summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-09-08 18:46:36 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-09-08 18:46:36 +0100
commitcfabd1291f55727c77a61db81e54eca423e12413 (patch)
tree5710aa8c394882fb882d4e016969783f16ba603f /lib
parent31059b3105fd579b315daa7a4dbecfe89627495a (diff)
downloadgall-cfabd1291f55727c77a61db81e54eca423e12413.tar.gz
GALL.TAG: Simplify header parsing, tags cannot duplicate headers
Diffstat (limited to 'lib')
-rw-r--r--lib/gall/tag.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/gall/tag.lua b/lib/gall/tag.lua
index 7bafbe7..0ea0cba 100644
--- a/lib/gall/tag.lua
+++ b/lib/gall/tag.lua
@@ -34,11 +34,8 @@ local function tagindex(tag, field)
if state == "headers" then
local first, second = l:match("^([^ ]+) (.+)$")
if first then
- if headers[first] then
- headers[first][#headers[first]+1] = second
- else
- headers[first] = { second }
- end
+ assert(not headers[first])
+ headers[first] = { second }
else
state = "message"
end