//Edit via InPageEdit
SkyEye FAST(讨论 | 贡献) (//Edit via InPageEdit) |
SkyEye FAST(讨论 | 贡献) (//Edit via InPageEdit) |
||
第20行:
end
-- Process the returned content to expand Rarechar templates
result = mw.text.unstripNoWiki(result) -- Ensure no wiki parsing occurs
result = mw.text.expandTemplate(result) -- Expand templates
return result
end
第27行 ⟶ 第32行:
return ''
end
local symbols = mw.loadData( 'Module:Zhchar/Symbols' )
local rareCharPattern = '{{RareChar|%s*([^|}]+)%s*|%s*([^|}]+)%s*}}'
return ( symbols[key] or key )▼
local rareCharReplacement = function( rareChar, rareCharArgs )
return mw.getCurrentFrame():expandTemplate{ title = 'RareChar', args = { rareChar, rareCharArgs } }
end
local replacedKey = key:gsub(rareCharPattern, rareCharReplacement)
end
return p
|