Content deleted Content added
Adding random article feature |
Strip leading and trailing white space from article names |
||
Line 12:
end
pagename = mw.ustring.match(pagename, "%[%[%s*(.-)[]|#]") or pagename -- "[[Foo|Bar]]" → "Foo"
pagename = mw.ustring.match(pagename, "%S.*%S") -- strip leading and trailing white space
local title = mw.title.new(pagename) -- Find the lead section of the named page
|