Module:Hatnote list: Difference between revisions
Content added Content deleted
(Removed behaviour of terminating list at empty page parameter; inconsistent with behaviour elsewhere) |
(Moved form of for-see statement into options) |
||
Line 48: | Line 48: | ||
options = options or {} |
options = options or {} |
||
local defaultOptions = { |
local defaultOptions = { |
||
⚫ | |||
disambiguator = ' (disambiguation)', |
disambiguator = ' (disambiguation)', |
||
forseeForm = 'For %s, see %s.', |
|||
⚫ | |||
otherText = 'other uses' |
otherText = 'other uses' |
||
} |
} |
||
Line 102: | Line 103: | ||
local useStr = v.use |
local useStr = v.use |
||
local seeStr = p.andList(mHatnote.formatPages(unpack(v.see))) |
local seeStr = p.andList(mHatnote.formatPages(unpack(v.see))) |
||
table.insert(strList, string.format( |
table.insert(strList, string.format(options.forseeForm, useStr, seeStr)) |
||
end |
end |
||
return mw.text.listToText(strList, ' ', ' ') |
return mw.text.listToText(strList, ' ', ' ') |