Modul:Detect singular: Unterschied zwischen den Versionen

flip argument meaning
(protect against bad wlink)
(flip argument meaning)
Zeile 15: Zeile 15:
local args = {}
local args = {}
-- canonicalize boolean arguments
-- canonicalize boolean arguments
for key, default in pairs({no_comma=false,ignore_links=true}) do
for key, default in pairs({no_comma=false,parse_links=false}) do
if origArgs[key] == nil then
if origArgs[key] == nil then
args[key] = default
args[key] = default
Zeile 23: Zeile 23:
end
end
local checkComma = not args.no_comma
local checkComma = not args.no_comma
local rewriteLinks = args.ignore_links
local rewriteLinks = not args.parse_links
local s = origArgs[1]  -- the input string
local s = origArgs[1]  -- the input string
if not s then
if not s then
Anonymer Benutzer