Module:Sandbox/Aseleste/Indexer: Difference between revisions

Content deleted Content added
test: debug
fix: broken replacement - attempt 6
Line 12:
local as_fold_function;
local escape_replacement;
local unstrip_and_strip_nowiki_tags;
local strip_nowiki_tags;
 
-- exposed: categorizes content and display them
Line 19:
local args = build_args(frame)
local folder = as_fold_function(strip_nowiki_tagsunstrip_and_strip_nowiki_tags(args.folder))
local keys = build_keys(args)
local values = build_values(strip_nowiki_tagsunstrip_and_strip_nowiki_tags(args.content))
local result = ""
Line 38:
end
return result
return mw.text.nowiki(strip_nowiki_tags(mw.text.unstrip(args.content)))
end
 
Line 65:
if arg_k_trim:match("^table_") then
local key = arg_k_trim:gsub("table_", "", 1)
result[key] = as_key_content_function(strip_nowiki_tagsunstrip_and_strip_nowiki_tags(mw.text.trim(arg_v)))
end
end
Line 155:
end
 
strip_nowiki_tagsunstrip_and_strip_nowiki_tags = function(text)
return mw.text.unstripNoWiki(text):gsub("<nowiki>", ""):gsub("</nowiki>", "")
end