Module:重返未来1999角色文化
跳到导航
跳到搜索
-- for 'culture' of reverse:1999 arcanists -- under construction local getArgs = require('Module:Arguments').getArgs local p = {} -- 1 function p.chap1(frame) local args = getArgs(frame) return p._chap1(args) end function p._chap1(args) local content = args.content1 content = ([[<p style="margin:0;text-indent:2em">]] .. string.gsub(content, "%c", [[</p><p style="margin:0;text-indent:2em">]]) .. [[</p>]]) content = string.gsub(content, [[>%s*</p>]], [[> </p>]]) return content end -- 2 same as chap1 function p.chap2(frame) local args = getArgs(frame) return p._chap2(args) end function p._chap2(args) local content = args.content2 content = ([[<p style="margin:0;text-indent:2em">]] .. string.gsub(content, "%c", [[</p><p style="margin:0;text-indent:2em">]]) .. [[</p>]]) content = string.gsub(content, [[>%s*</p>]], [[> </p>]]) return content end -- 3 tableize, get colored function p.chap3(frame) local args = getArgs(frame) return p._chap3(args) end function p._chap3(args) local content = args.content3 local name = args.name content = string.gsub(content, '%c%s*%c', '\n|-\n|colspan="2"| \n') -- blank lines content = string.gsub(content, '白雪松:', '|-\n|style="font-weight:bold;white-space:nowrap;vertical-align:top"|白雪松:||') content = string.gsub(content, name .. ':', '|-\n|style="color:#884221;font-weight:bold;white-space:nowrap;vertical-align:top"|' .. name .. ':||') return ('{|style=""\n' .. content .. '\n|}') end return p -- P.S. If there's any problem with the module, please fix it yourself. The author is Lua-0, ja-0 and en-1. Don't count on him.