Editing Module:Item
Appearance
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
local lib = require('Module:Feature') | local lib = require('Module:Feature') | ||
| Line 106: | Line 104: | ||
function addPunct(var) | function addPunct(var) | ||
if args.comma or args. | if args.comma or args.commaspc then var = var .. ',' | ||
elseif args.dot or args. | elseif args.dot or args.dotspc then var = var .. '.' | ||
end | end | ||
var = var | var = var | ||
| Line 121: | Line 119: | ||
end | end | ||
if args. | if args.commaspc or args.dotspc then b = b .. ' ' end -- space always on the very end | ||
return {a, b} | return {a, b} | ||
| Line 156: | Line 154: | ||
if (ref) then | if (ref) then | ||
local after = (args. | local after = (args.commaspc or args.dotspc) and ' ' or '' -- avoid space between ref and punctuation | ||
item_text:wikitext(ref, after) | item_text:wikitext(ref, after) | ||
end | end | ||