ldoc icon indicating copy to clipboard operation
ldoc copied to clipboard

Placeholders (e.g. $1, $2) in tag modifiers are not resolved correctly

Open jirutka opened this issue 10 years ago • 2 comments
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

jirutka avatar Oct 19 '15 01:10 jirutka

Yeah, it is seriously random. But your fix broke my tests - I'll review it tomorrow.

stevedonovan avatar Jun 27 '16 16:06 stevedonovan

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!

alerque avatar May 04 '23 20:05 alerque