Documentation for this module may be created at Module:Dragon/doc

local p = {}
local dragonData = mw.loadData( 'Module:Dragon/data' )

function p.Dragon( frame )
  local dragonIssue = frame.args.issue or "1"
  local page = frame.args.page or ""
  local article = frame.args.article or ""

  if not (page == "") then
    page = ", p." .. frame.args.page
  end

  if not (article == "") then
    article = "''" .. frame.args.article .. "'', "
  end

  return ( article .. (dragonData[dragonIssue] or "'''Error: No such issue'''") .. page)
end

function p.FirstPage ( frame )
  local pages = frame.args[1] or ""

  if not (pages == "") then
    pages = "-" .. string.gsub (frame.args[1], "%-.*", "")
  end

  return pages
end

return p
Community content is available under CC-BY-SA unless otherwise noted.