Module:EncounterTable: Difference between revisions

ok this fixes it for sure.
mNo edit summary
(ok this fixes it for sure.)
Line 87: Line 87:
     elseif row["item"] == 'none' then  
     elseif row["item"] == 'none' then  
        
        
       finalTable[i]['item'] = 'Item from [[EncounterTable:' .. row['table']:match('^(.+)%s-%w-$') .. '#' .. row['table'] .. '|' .. row['table'] .. ']]'
       finalTable[i]['item'] = 'Item from [[EncounterTable:' .. row['table']:match('^(.+)%s+%w*$') .. '#' .. row['table'] .. '|' .. row['table'] .. ']]'
     else
     else
       error('A table and item cannot be specified at the same time!')
       error('A table and item cannot be specified at the same time!')
Line 110: Line 110:
end
end


function p.test(s)
  return s:match('^(.+)%s+%w*$')
end
return p
return p