打开/关闭搜索
搜索
打开/关闭菜单
1706
4999
924
6.3万
RIA | Wiki
导航
首页
最近更改
随机页面
MediaWiki帮助
上传文件
RIA社群
RIA官网&红报社
RIA论坛
打开/关闭外观设置菜单
通知
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
登录
目前wiki关闭了自行注册账号的功能,如需注册账号,请查阅
Help:注册账号
。
查看“︁模块:Outdent”︁的源代码
来自RIA | Wiki
查看
阅读
查看源代码
查看历史
associated-pages
模块
讨论
更多操作
←
模块:Outdent
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于这些用户组的用户执行:
用户
、已验证用户
您必须确认您的电子邮件地址才能编辑页面。请通过
参数设置
设置并确认您的电子邮件地址。
您可以查看和复制此页面的源代码。
local p = {} local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') function p.outdent(frame) local args = getArgs(frame) local width = 0 local reversed = args['reverse'] or args['indent'] or args['r'] or args['in'] -- aliases for reverse local reversed = yesno(reversed) if not args[1] then args[1] = '' end -- un-nil args[1] width = width + select(2, string.gsub(args[1],':','')) -- increase by 1 for every : width = width + select(2, string.gsub(args[1],'*','')) -- increase by 1 for every * width = width + select(2, string.gsub(args[1],'#','')) * 2 -- increase by 2 for every # if width == 0 then width = tonumber(args[1]) end -- set width to args[1] if needed if not width then width = 10 end -- default width if width < 0 then width = -width reversed = not reversed end if width > 40 then width = 40 end -- max width width = width * 1.6 -- set width to proper width local note = yesno(args['note'] or args[2]) and '([[wikipedia:Wikipedia:Indentation#Outdenting|重设缩进]])' or '' -- note local templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Outdent/styles.css' } } return templatestyles .. '<div class="template-outdent' .. ((reversed and ' reversed') or '') .. '" style="width: ' .. width .. 'em"><div class="template-outdent-line"></div></div>' .. note end return p
该页面嵌入的页面:
模块:Outdent/doc
(
查看源代码
)
返回
模块:Outdent
。
查看“︁模块:Outdent”︁的源代码
来自RIA | Wiki