"ഘടകം: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
വരി 34:
-- 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 77 ⟶ 75:
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 85 ⟶ 83:
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 192 ⟶ 190:
checkType('_hatnote', 1, s, 'string')
checkType('_hatnote', 2, options, 'table', true)
options = options or {}
local classes = {'hatnote'}
local extraclasses = options.extraclasses
"https://ml.wikipedia.org/wiki/ഘടകം:Hatnote" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്