anchored tag pattern at start; embedded @ caused mischief

This commit is contained in:
steve donovan 2011-04-17 16:56:27 +02:00
parent f5e2b69cff
commit f3406df40d
1 changed files with 2 additions and 1 deletions

View File

@ -99,7 +99,7 @@ local tnext = lexer.skipws
-- a pattern particular to LuaDoc tag lines: the line must begin with @TAG,
-- followed by the value, which may extend over several lines.
local luadoc_tag = '%s*@(%a+)%s(.+)'
local luadoc_tag = '^%s*@(%a+)%s(.+)'
-- assumes that the doc comment consists of distinct tag lines
function parse_tags(text)
@ -123,6 +123,7 @@ end
local function extract_tags (s)
if s:match '^%s*$' then return {} end
local preamble,tag_items = parse_tags(s)
local strip = tools.strip
local summary,description = preamble:match('^(.-)[%.?]%s(.+)')
if not summary then summary = preamble end