మాడ్యూల్:Find sources: కూర్పుల మధ్య తేడాలు
Content deleted Content added
చి Protected Module:Find sources: High-risk Lua module ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)) |
don't quote disambiguation text for default searches using the current subpage name |
||
పంక్తి 105:
searchTerms[i] = s
end
-- Use the current subpage name as the default search query. If the page
-- uses a disambiguator like "Foo (bar)", make "Foo" the first query and
-- "bar" the second.
local term, dab = title.subpageText:match('^(.*) (%b())$')
if dab then
dab = dab:sub(2, -2) -- Remove parens
end
if term and dab then
searchTerms[1] = term
searchTerms[2] = dab
else
searchTerms[1] = title.subpageText
end
end
searchTerms[1] = '"' .. searchTerms[1] .. '"'
|