-- This is a meta-module for producing block quotationslocalgetArgs=require('Module:Arguments').getArgslocalblockquote={}blockquote.__index=blockquotefunctionblockquote.new()localobj={}obj.classes={'templatequote'}setmetatable(obj,blockquote)returnobjendfunctionblockquote:setBlockquoteParameters(args)self.quote=args.quoteself.author=args.authorifargs.borderedthenself:addClass('toccolours')endifargs.fitthenself:addStyle('display:table;')endself:addStyle(args.style);endfunctionblockquote:addClass(class)iftype(class)~='string'thenreturnendself.classes=self.classesor{}table.insert(self.classes,class)endfunctionblockquote:addStyle(style)iftype(style)~='string'thenreturnendself.style=self.styleor''self.style=self.style..styleendfunctionblockquote:export()localaquote=mw.html.create('blockquote')ifself.idthenaquote:attr('id',self.id)endfori,classinipairs(self.classesor{})doaquote:addClass(class)endaquote:cssText(self.style)aquote:wikitext(self.quote)-- Add a <footer> (or <div> for now) with the citationifself.authororself.sourcethenaquote:tag('div'):addClass('templatequotecite'):wikitext(self.author);endreturntostring(aquote)endlocalfunctionmain(args)localbq=blockquote.new()bq:setBlockquoteParameters(args)returnbq:export()endlocalfunctionmainFrame(frame)localargs=getArgs(frame,{trim=false,removeBlanks=false})main(args)endlocalp={main=mainFrame,test=main}returnp