Content deleted Content added
No edit summary |
Undid revision 1147915801 by Lemondoge (talk): oh dear. I checked with testcases - don't know how this goofed |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1:
require('strict')
local p = {}
Line 87 ⟶ 82:
eSep = escape_word(tArgs.sep)
local patstring = '%f[^' .. eSep .. '][^' .. eSep .. ']+%f[' .. eSep .. ']'
if yesno(tArgs.explain,
report.xpMessage('1.eSep: ' .. eSep) -- dev
report.xpMessage('2.pattern: ' .. patstring) -- dev
Line 168 ⟶ 163:
bAND = true
end
return bAND, tHits
end
Line 231 ⟶ 226:
-- explain=testcases => WHEN in ns: template: or user: AND subpage = '/testcases' THEN show permanently
local function checkExplain(tArgs)
return false -- never. 22Mar2023 checkExplain(newArgs)
end
Line 279 ⟶ 260:
-- No words to check
resultALL = false
if yesno(tArgs.explain,
report.xpNoWords(tArgs, sourceWordTable, andWordTable, orWordTable)
end
Line 303 ⟶ 284:
end
if yesno(tArgs.explain,
if tArgs.yes ~= nil then
if (tArgs.yes == '') and (tArgs.no == '') then
Line 359 ⟶ 340:
newArgs['orString'] = decodeUnicode(origArgs['orw'] or origArgs['orwords'] or '')
-- boolean options: catch both parameters, also handle nil & nonsense input values:
newArgs['case'] = yesno(origArgs['case'] or origArgs['casesensitive'] or
newArgs['booleans'] = yesno(origArgs['bool'] or origArgs['booleans'] or false, false) -- defaults to False
newArgs['literals'] = yesno(origArgs['literals'] or origArgs['lit'] or true, true) -- defaults to True
newArgs['yes'] = origArgs['yes'] or nil -- nil; default so return sYeslist; keep '' as legal input & return value
newArgs['no'] = origArgs['no'] or ''
newArgs['explain'] =
newArgs.explain = false -- never. 22Mar2023 checkExplain(newArgs)
return newArgs
Line 377 ⟶ 358:
tArgs = parseArgs(origArgs)
if yesno(tArgs.explain,
initReport()
report.xpListArguments(origArgs)
Line 389 ⟶ 370:
end
if yesno(tArgs.explain,
return sReturn .. report.xpPresent(tArgs.explain)
else
|