Content deleted Content added
explain (debug): -- never. 22Mar2023 checkExplain(newArgs) see /sandbox developments. |
m Simplified code, primarily by eliminating a few sources of redundancy Tag: Reverted |
||
Line 79:
hitCount = 0
sWordlist = tArgs.sep .. sWordlist .. tArgs.sep
local eSep = escape_word(tArgs.sep)
local patstring = '%f[^' .. eSep .. '][^' .. eSep .. ']+%f[' .. eSep .. ']'
if yesno(tArgs.explain, false) then
Line 142 ⟶ 141:
-- note 2: empty AND-wordlist => True by logic (because: not falsified)
local function checkANDwords(sourceWordTable, andWordTable)
local
local
local
if #andWordTable > 0 then
for i, word in ipairs(andWordTable) do
Line 160 ⟶ 156:
end
end
end
Line 174 ⟶ 168:
-- note 2: while just one hitword is a True result, the hittable contains all words found
local function checkORwords(sourceWordTable, orWordTable)
local
local
local
if #orWordTable > 0 then
for i, word in ipairs(orWordTable) do
Line 208 ⟶ 199:
return tArgs.no or ''
else -- True
end
end
Line 285 ⟶ 272:
if yesno(tArgs.explain, false) then
if (tArgs.yes
▲ report.xpYesNoBothBlank()
end
if warningIMaxWordsReached ~= nil then
Line 365 ⟶ 350:
sReturn = p._main(tArgs)
if warningIMaxWordsReached ~= nil then
local preview = require('Module:If preview')
sReturn = sReturn .. preview._warning({warningIMaxWordsReached})
|