temporary file hack borked on Windows; working on parsing tag modifiers _properly_
This commit is contained in:
parent
d47c0f89bf
commit
b903eb79df
2
ldoc.lua
2
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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue