diff --git a/ldoc.lua b/ldoc.lua index 2b2b3ae..92a4a42 100644 --- a/ldoc.lua +++ b/ldoc.lua @@ -774,7 +774,7 @@ end local builtin_style, builtin_template = match_bang(args.style),match_bang(args.template) if builtin_style or builtin_template then -- '!' here means 'use built-in templates' - local user = path.expanduser('~'):gsub('[/\\ ]','_') + local user = path.expanduser('~'):gsub('[/\\: ]','_') local tmpdir = path.join(path.is_windows and os.getenv('TMP') or '/tmp','ldoc'..user) if not path.isdir(tmpdir) then lfs.mkdir(tmpdir) diff --git a/ldoc/doc.lua b/ldoc/doc.lua index 6f21c25..4bca4ab 100644 --- a/ldoc/doc.lua +++ b/ldoc/doc.lua @@ -537,13 +537,17 @@ function Item.check_tag(tags,tag, value, modifiers) if avalue then value = avalue..' '..value end if amod then modifiers = modifiers or {} + local value_tokens = utils.split(value) for m,v in pairs(amod) do - local idx = v:match('^%$(%d+)') + local idx = tonumber(v:match('^%$(%d+)')) if idx then v, value = value:match('(%S+)(.*)') + -- v = value_tokens[idx] + -- value_tokens[idx] = '' end modifiers[m] = v end + -- value = table.concat(value_tokens, ' ') end else -- has to be a function that at least returns tag, value return alias(tags,value,modifiers)