Модуль:FetchData: відмінності між версіями

нема опису редагування
Немає опису редагування
Немає опису редагування
Рядок 21: Рядок 21:
     end
     end


     -- Lua patterns to match the player's data
     -- Lua patterns to match the player's data directly or linked
     local pattern = "|%s*%[%[" .. mw.ustring.gsub(player, "([%(%)%.%-%+])", "%%%1") .. "|[^%]]+%]%]%s*|%s*(%d+)%s*|"
     local pattern = "\\|\\s*%[%[" .. mw.ustring.gsub(player, "([%(%)%.%-%+])", "%%%1") .. "|[^%]]+%]%]%s*|%s*(%d+)%s*|"
     local rank = content:match(pattern)
    local direct_pattern = "\\|\\s*" .. mw.ustring.gsub(player, "([%(%)%.%-%+])", "%%%1") .. "%s*|%s*(%d+)%s*|"
     local rank = content:match(pattern) or content:match(direct_pattern)
      
      
     if not rank then
     if not rank then