Content deleted Content added
test: debug Tags: Manual revert Reverted |
|||
Line 13:
local escape_replacement;
local unstrip_and_strip_nowiki_tags;
-- exposed: categorizes content and display them
Line 21 ⟶ 19:
local args = build_args(frame)
local folder = as_fold_function(mw.text.trim(unstrip_and_strip_nowiki_tags(args.folder)))
local keys = build_keys(args)
local values = build_values(mw.text.trim(unstrip_and_strip_nowiki_tags(args.content)))
local result = ""
Line 40 ⟶ 38:
end
return mw.text.nowiki(mw.dumpObject(
end
Line 67 ⟶ 65:
if arg_k_trim:match("^table_") then
local key = arg_k_trim:gsub("table_", "", 1)
result[key] = as_key_content_function(mw.text.trim(unstrip_and_strip_nowiki_tags(arg_v)))
end
end
Line 128 ⟶ 126:
as_key_content_function = function(text)
local function func(content)
return text:gsub("__M_CONTENT__", escape_replacement(content))
end
Line 138 ⟶ 135:
as_value_content_function = function(text)
local function func(category)
return text:gsub("__M_CATEGORY__", escape_replacement(category))
end
Line 149 ⟶ 145:
local function func(left, right)
-- some improvements could be made here
return text:gsub("__M_LEFT__", escape_replacement(left)):gsub("__M_RIGHT__", escape_replacement(right))
end
|