Changes
Jump to navigation
Jump to search
fix use of global variables defined by Module:Mw
local z = {
wikitext = require ("Module:Wikitext"), mw = require("Module:Mw")
}
function nowiki(frame, content)
return z.mw.text.tag({name="nowiki",contents=content,params={}}, frame)
end
args.suffix = args.suffix or ""
local t0 = onlyinprint(args.label .. sep .. args.id)
local t1 = hideinprint("[[" .. args.link .. "|" .. args.label .. "]]" .. sep .. "[" .. args.prefix .. z. mw.url.encode(args.id) .. args.suffix .. " " .. nowiki(frame, args.id) .. "]")
return t0 .. t1
end
end
local result = table.concat(text, sep) -- construct list
if ( "scap" == format ) then result= z.mw.text.tag({name="span", contents=result, params={class="smallcaps", style="font-variant:small-caps;"}}) end -- if necessary wrap result in <span> tag to format in Small Caps
return result
end
local OCinStitle = "ctx_ver=" .. ctx_ver -- such as "Z39.88-2004"
for name,value in pairs(OCinSids) do
OCinStitle = OCinStitle .. "&rft_id=" .. z. mw.url.encode(name .. "/" .. value)
end
for name,value in pairs(OCinSdata) do
OCinStitle = OCinStitle .. "&" .. name .. "=" .. z. mw.url.encode(value)
end
OCinStitle = OCinStitle .. "&rfr_id=info:sid/en.wikipedia.org:"
if ( AccessDate ~= nil ) then AccessDate = " Retrieved " .. AccessDate .. "." else AccessDate = "" end
if ( SubscriptionRequired ~= nil ) then
SubscriptionRequired = " " .. z. mw.text.tag({name="span", contents="(subscription required)", params={style="font-size:0.95em; font-size: 90%; color: #555"}})
else
SubscriptionRequired = ""
args.id = id;
end
text = z.mw.text.tag({name="span", contents=text, params=args})
local OCinS = z.mw.text.tag({name="span", contents=" ", params={class="Z3988",title=OCinStitle,style="display: none;"}})
return text .. OCinS
if ( page ~= nil ) then
local contents = ":" .. page
p = z.mw.text.tag({name="sup",contents=contents,params={class="reference",style="white-space:nowrap;"}})
end
return z.mw.text.tag({name="ref",contents="",params={name=name,group=group}}, frame) .. p
end
params.style = params.style .. " " .. z.wikitext.columnwidthstyle(width)
end
local references = z.mw.text.tag({name="references",contents=contents,params={group=group}}, frame) return z.mw.text.tag({name="div",contents=references,params=params})
end
local content = crossref(frame, pframe.args)
local args = { name = refid(pframe.args) }
return z.mw.text.tag({name = "ref", contents = content, params = args}, frame)
end
params.class="reference"
if ( args.noid == nil or args.noid == "" ) then params.id = "ref_" .. P1 .. P3 end
return z.mw.text.tag({name="sup",contents=contents,params=params})
end
local contents
if arrow ~= "" then
local sup_arrow = z.mw.text.tag({name="sup",contents=arrow,params={}})
contents = "[[#ref_" .. id .. arrow .. "|'''" .. sup_arrow .. "''']]" .. postscript
if "none" == arrow then arrow = "^" end -- Change this AFTER using it in the ID parameter and the contents.
local params = { class="citation wikicite" }
if id ~= "" and ( args.noid == nil or args.noid == "" ) then
params.id = z.mw.url.encodeAnchor("endnote_" .. id .. arrow)
end
return z.mw.text.tag({name="span",contents=contents,params=params})
end
local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself
local args = pframe.args -- the arguments passed TO the template, in the wikitext that instantiates the template
return z.mw.text.tag({name="ref",contents=(args[1] or ""),params={name=args.name,group=config.default_group}}, frame)
end