Module:Quote

local p = {}

local userError = require('Dev:User error') local tags = require('Module:Tags')

function p.main(frame) local args = frame:getParent.args if not args[1] then return userError('No quotation text provided', 'Pages with user errors') end local quote = mw.ustring.gsub(mw.text.trim(args[1]), '\n', ' ') quote = tags.replace(quote) local html = mw.html.create('blockquote'):attr({       ['data-template'] = 'quote',        ['data-font']     = args[3]    }) :tag('p') :wikitext(quote) :done if args[2] then html:tag('cite') :wikitext(args[2]) :done end return tostring(html:done) end

return p