Module:ColorParse: Difference between revisions

Jump to navigation Jump to search
73 bytes added ,  02:36, 13 November 2019
(by SublimeText.Mediawiker)
imported>Teamtotobot
((by SublimeText.Mediawiker))
imported>Teamtotobot
((by SublimeText.Mediawiker))
Line 60: Line 60:


function p.main(frame)
function p.main(frame)
local notxml = nil
local isnotxml = nil
   local unbolded = false
   local unbolded = false
   local tildes = false
   local tildes = false
  local text = ''
  local args = process_args.merge(true)
  local args = process_args.merge(true)
  for _, arg in ipairs(args) do
  for _, arg in ipairs(args) do
     if arg == 'notxml' then
     if arg == 'notxml' then
         notxml = 'notxml'
         isnotxml = 'notxml'
       elseif arg == 'unbolded' then
       elseif arg == 'unbolded' then
         unbolded = true
         unbolded = true
       elseif arg == 'tildes are new lines' then
       elseif arg == 'tildes are new lines' then
         tildes = true
         tildes = true
        elseif text == '' then
        text = arg
       end
       end
   end
   end
      
      
   local returntext = p.parse(args[1], notxml)
   local returntext = p.parse(text, isnotxml)
   if tildes  == true then  
   if tildes  == true then  
     returntext = p.linebreaks(returntext)
     returntext = p.linebreaks(returntext)
Anonymous user

Navigation menu