From 04dc148df606c79e1931d322ccd730eb151b8e78 Mon Sep 17 00:00:00 2001 From: steve donovan Date: Mon, 6 Jan 2014 15:03:09 +0200 Subject: [PATCH] Issue #145: do not expand annotations if there's no previous item --- ldoc/doc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldoc/doc.lua b/ldoc/doc.lua index ef8aa31..ea25ad0 100644 --- a/ldoc/doc.lua +++ b/ldoc/doc.lua @@ -129,8 +129,8 @@ known_tags._annotation_tags = { local acount = 1 function doc.expand_annotation_item (tags, last_item) - if tags.summary ~= '' then return false end - local item_name = last_item and last_item.tags.name or '?' + if tags.summary ~= '' or last_item == nil then return false end + local item_name = last_item.tags.name for tag, value in pairs(tags) do if known_tags._annotation_tags[tag] then tags:add('class','annotation')