Module:Hatnote list: Difference between revisions
Jump to navigation
Jump to search
Moved form of for-see statement into options
>Nihiltres (Removed behaviour of terminating list at empty page parameter; inconsistent with behaviour elsewhere) |
>Nihiltres (Moved form of for-see statement into options) |
||
Line 48: | Line 48: | ||
options = options or {} | options = options or {} | ||
local defaultOptions = { | local defaultOptions = { | ||
disambiguator = ' (disambiguation)', | |||
forseeForm = 'For %s, see %s.', | |||
title = mw.title.getCurrentTitle().text, | title = mw.title.getCurrentTitle().text, | ||
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, ' ', ' ') |