"मोड्युल:Hatnote" का संशोधनहरू बिचको अन्तर

Content deleted Content added
sorry about that; we need to keep findNamespaceId around for other modules
fix a mistake in the module comments; allow overriding the title in makeWikitextError; allow people to call _hatnote without an options table; and remove a comment about usage, as it is now covered in the test cases
पङ्क्ति ३४:
-- function will not work if the link is enclosed in double brackets. Colons
-- are trimmed from the start of the link by default. To skip colon
-- trimming, set the removeColon parameter to truefalse.
--
-- This function is used by other modules, e.g. [[Module:Main]].
checkType('findNamespaceId', 1, link, 'string')
checkType('findNamespaceId', 2, removeColon, 'boolean', true)
Line ७७ ⟶ ७५:
end
 
function p.makeWikitextError(msg, helpLink, addTrackingCategory, title)
-- Formats an error message to be returned to wikitext. If
-- addTrackingCategory is not false after being returned from
Line ८५ ⟶ ८३:
checkType('makeWikitextError', 2, helpLink, 'string', true)
yesno = require('Module:Yesno')
local title = title or mw.title.getCurrentTitle()
-- Make the help link text.
local helpText
Line १९२ ⟶ १९०:
checkType('_hatnote', 1, s, 'string')
checkType('_hatnote', 2, options, 'table', true)
options = options or {}
local classes = {'hatnote'}
local extraclasses = options.extraclasses
"https://ne.wikipedia.org/wiki/मोड्युल:Hatnote" बाट अनुप्रेषित