欢迎来到奇葩栖息地!欢迎加入Discord服务器:XfrfHCzfbW欢迎加入QQ频道:r01m9y3iz6请先至特殊:参数设置验证邮箱后再进行编辑。特殊:参数设置挑选自己想要使用的小工具!不会编辑?请至这里学习Wikitext语法。

模块:Zhchar:修订间差异

来自奇葩栖息地
删除233字节 、​ 2024年3月17日 (星期日)
//Edit via InPageEdit
(//Edit via InPageEdit)
(//Edit via InPageEdit)
第20行:
end
local result =return table.concat( zhchar )
-- Process the returned content to expand Rarechar templates
local result = table.concat( zhchar )
result = mw.text.unstripNoWiki(result) -- Ensure no wiki parsing occurs
result = mw.text.expandTemplate(result) -- Expand templates
return result
end
 
第36行 ⟶ 第31行:
local rareCharPattern = '{{RareChar|%s*([^|}]+)%s*|%s*([^|}]+)%s*}}'
local rareCharReplacement = function( rareChar, rareCharArgs )
return mw.text.trim(mw.getCurrentFrame():preprocess(expandTemplate{ title = '{{RareChar|', ..args rareChar= ..{ '|' ..rareChar, rareCharArgs ..} '}}'))
end
 
第43行 ⟶ 第38行:
return ( symbols[replacedKey] or replacedKey )
end
 
return p
2,007

个编辑