ldoc
ldoc copied to clipboard
Placeholders (e.g. $1, $2) in tag modifiers are not resolved correctly
trafficstars
It just ignores the index number and resolves modifiers in a random order.
See Item.check_tag in doc.lua:
for m,v in pairs(amod) do
local idx = v:match('^%$(%d+)')
if idx then
v, value = value:match('(%S+)(.*)')
end
modifiers[m] = v
end
Yeah, it is seriously random. But your fix broke my tests - I'll review it tomorrow.
It isn't clear to me whether this issue is resolved or not, the code still uses pairs() not ipairs() ... or maybe that fix is the tonumber() that got added there?
In any case to move this forward some confirmation and/or an MWE would be great!