Module:ModuleLevelTable: Difference between revisions

From The First Descendant Wiki
No edit summary
No edit summary
Line 1: Line 1:
-- Module:CSVProcessor
local p = {}
local p = {}


Line 5: Line 4:
     local csvText = frame.args[1] or ""
     local csvText = frame.args[1] or ""
     local result = ""
     local result = ""
   
    -- Example: Simple processing to convert CSV to a bulleted list
     for line in csvText:gmatch("[^\r\n]+") do
     for line in csvText:gmatch("[^\r\n]+") do
         -- Process each line here. For example, we can just concatenate them.
         result = result .. "* " .. line .. "\n"
        --result = result .. line .. "\n"
        result = "Testing the lua"
     end
     end
   
     return result
     return result
end
end


return p
return p

Revision as of 01:01, 4 June 2024

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

local p = {}

function p.process(frame)
    local csvText = frame.args[1] or ""
    local result = ""
    
    -- Example: Simple processing to convert CSV to a bulleted list
    for line in csvText:gmatch("[^\r\n]+") do
        result = result .. "* " .. line .. "\n"
    end
    
    return result
end

return p