Module:C

local C = { }

local HF = require("Module:HF") local parent = nil

local build = function(arg, arg2) local built = ""

if not HF.isempty(arg) then link = arg if not HF.isempty(arg2) then text = arg2 end

title = string.match(arg, "(.+) Vol ") if HF.isempty(title) then title = string.match(arg, "(.+) #") end if HF.isempty(title) then title = "Title Failed" end volume = string.match(arg, "Vol ([^%s]+)") if HF.isempty(volume) then volume = "1" end issue = string.match(arg, " #(.+)$") if HF.isempty(issue) then issue = string.match(arg, "Vol [^%s]+ (.+)$") end if HF.isempty(issue) then issue = "Issue Failed" end if volume == "1" then poundTitle = ("" .. title .. " #" .. issue ) else poundTitle = ("" .. title .. " Vol " .. volume .. " #" .. issue ) end linkTitle = title .. " Vol " .. volume .. " " .. issue --   print("Test #" .. t .. ": " .. "" .. poundTitle .. "") if string.find(title, "—") == nil and string.find(title, "%[") == nil and string.find(string.lower(title), "cnst") == nil then if HF.isempty(text) then built = "" .. poundTitle .. "" else built = "" .. text .."" end else built = arg end end return built

end

function C.comic(frame) parent = frame:getParent local arg = parent.args[1] local arg2 = parent.args[2] local output = "" output = build(arg, arg2) return output end

return C