From cfabd1291f55727c77a61db81e54eca423e12413 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 8 Sep 2012 18:46:36 +0100 Subject: GALL.TAG: Simplify header parsing, tags cannot duplicate headers --- lib/gall/tag.lua | 7 ++----- 1 file 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 -- cgit v1.2.1