temporary file hack borked on Windows; working on parsing tag modifiers _properly_
steve donovan
7 years ago
536 | 536 |
if avalue then value = avalue..' '..value end
|
537 | 537 |
if amod then
|
538 | 538 |
modifiers = modifiers or {}
|
|
539 |
local value_tokens = utils.split(value)
|
539 | 540 |
for m,v in pairs(amod) do
|
540 | |
local idx = v:match('^%$(%d+)')
|
|
541 |
local idx = tonumber(v:match('^%$(%d+)'))
|
541 | 542 |
if idx then
|
542 | 543 |
v, value = value:match('(%S+)(.*)')
|
|
544 |
-- v = value_tokens[idx]
|
|
545 |
-- value_tokens[idx] = ''
|
543 | 546 |
end
|
544 | 547 |
modifiers[m] = v
|
545 | 548 |
end
|
|
549 |
-- value = table.concat(value_tokens, ' ')
|
546 | 550 |
end
|
547 | 551 |
else -- has to be a function that at least returns tag, value
|
548 | 552 |
return alias(tags,value,modifiers)
|
773 | 773 |
local builtin_style, builtin_template = match_bang(args.style),match_bang(args.template)
|
774 | 774 |
if builtin_style or builtin_template then
|
775 | 775 |
-- '!' here means 'use built-in templates'
|
776 | |
local user = path.expanduser('~'):gsub('[/\\ ]','_')
|
|
776 |
local user = path.expanduser('~'):gsub('[/\\: ]','_')
|
777 | 777 |
local tmpdir = path.join(path.is_windows and os.getenv('TMP') or '/tmp','ldoc'..user)
|
778 | 778 |
if not path.isdir(tmpdir) then
|
779 | 779 |
lfs.mkdir(tmpdir)
|