From f54e13185ec8cc33f7c0a5c3383291f71d7531c1 Mon Sep 17 00:00:00 2001 From: steve donovan Date: Fri, 21 Dec 2012 18:25:06 +0200 Subject: [PATCH] tag modifier code not respecting boolean types; export tag now properly makes local functions module-scope --- ldoc/doc.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ldoc/doc.lua b/ldoc/doc.lua index ac21dd4..cf84712 100644 --- a/ldoc/doc.lua +++ b/ldoc/doc.lua @@ -139,7 +139,7 @@ function File:export_item (name) local tags = item.tags if tags.name == name then if tags['local'] then - tags['local'] = false + tags['local'] = nil end end end @@ -395,19 +395,17 @@ end -- in the tag value table and need to be extracted. local function extract_value_modifier (p) - if type(p)=='string' then + if type(p)~='table' then return p, { } - elseif type(p) == 'table' then - return p[1], p.modifiers or { } else - return 'que?',{} + return p[1], p.modifiers or { } end end local function extract_tag_modifiers (tags) local modifiers, mods = {} for tag, value in pairs(tags) do - if type(value)=='table' and value.append then + if type(value)=='table' and value.append then -- i.e. it is a List! local tmods = {} for i, v in ipairs(value) do v, mods = extract_value_modifier(v)