Content deleted Content added
our license is 3.0 |
Sophivorus (talk | contribs) Update to 1.5 (non free files are now removed by default, and inline excerpts now use no tags rather than <span> tags) |
||
Line 2:
-- Documentation https://www.mediawiki.org/wiki/Module:Excerpt
-- By User:Sophivorus, User:Certes & others
-- Version 1.
-- License CC BY-SA-3.0
Line 67:
local references = getArg( 'references' )
local subsections = not yesno( getArg( 'subsections' ) )
local noLinks = not yesno( getArg( 'links', true ) )
local noBold = not yesno( getArg( 'bold' ) )
local
local inline = yesno( getArg( 'inline' ) )
local quote = yesno( getArg( 'quote' ) )
Line 125 ⟶ 126:
references = references,
only = only and mw.text.trim( only, 's' ) .. 's',
noLinks = noLinks,
noBold = noBold,
noSelfLinks = true,
noNonFreeFiles =
noBehaviorSwitches = true,
fixReferences = true,
Line 162 ⟶ 164:
end
excerpt = '[[File:' .. file .. '|thumb|' .. ( caption or '' ) .. ']]' .. excerpt
if (
excerpt = Transcluder.removeNonFreeFiles( excerpt )
end
Line 217 ⟶ 219:
-- Combine and return the elements
local tag1 = 'div'▼
tag2 = 'blockquote'▼
excerpt = mw.html.create( tag1 ):addClass( 'excerpt' ):wikitext( excerpt )▼
if inline then
end
local block = mw.html.create( tag2 ):addClass( 'excerpt-block' ):addClass( class )▼
if
end
return block:node( styles ):node( hat ):node( excerpt ):node( more )
end
|