Module:Qud look: Difference between revisions

Jump to navigation Jump to search
404 bytes added ,  02:21, 29 December 2020
make linebreaks argument actually do things
imported>Teamtotobot
((by SublimeText.Mediawiker))
(make linebreaks argument actually do things)
 
(6 intermediate revisions by 2 users not shown)
Line 4: Line 4:
function p.qudlook(frame)
function p.qudlook(frame)


    local args
local bordercolor
local bordercolor
local padding
local padding
local bottomtext
local bottomtext
local linebreaks


--[determine notxml]--
--[determine notxml]--
Line 15: Line 17:
     notxml = true
     notxml = true
   end
   end
end
if frame.args.linebreaks == "yes" then
linebreaks = true
else
linebreaks = false
end
end


Line 34: Line 41:
--[Determine qud text]--
--[Determine qud text]--
local text = frame.args['text'] or ""
local text = frame.args['text'] or ""
if linebreaks then
text = colorparse.linebreaks(text)
end


--[Determine body padding]--
--[Determine body padding]--
Line 57: Line 67:
local textcontent
local textcontent
local parsedbottomtext
local parsedbottomtext
if notxml == true then
        if colorparse.determinexml(titlein) then
  title = colorparse.parse('&y'..titlein, 'notxml')
            title = colorparse.parse('&y'.. titlein, 'xml')
  textcontent=colorparse.parse('&y' .. text, 'notxml')
        else
  parsedbottomtext=colorparse.parse('&Y'..bottomtext, 'notxml')
            title = colorparse.parse('&y'..titlein, 'notxml')
        end
if colorparse.determinexml(text) then
        textcontent=colorparse.parse('&y' .. text, 'xml')
else
else
  title = colorparse.parse('&y'.. titlein)
            textcontent=colorparse.parse('&y' .. text, 'notxml')
  textcontent=colorparse.parse('&y' .. text)
end
  parsedbottomtext=colorparse.parse('&Y'..bottomtext)
  if colorparse.determinexml(bottomtext) then
            parsedbottomtext=colorparse.parse('&Y'..bottomtext, 'xml')
        else
      parsedbottomtext=colorparse.parse('&Y'..bottomtext, 'notxml')
end
end


Navigation menu