×
Create a new article
Write your page title here:
We currently have 2,839 articles on YumeWiki. Type your article name above or click on one of the titles below and start writing!



    YumeWiki
    2,839Articles

    Module:TestModule: Difference between revisions

    No edit summary
    No edit summary
    Line 1: Line 1:
    local p = {}
    local p = {}
    function lines(str)
      local t = {}
      local function helper(line)
          table.insert(t, line)
          return ""
      end
      helper((str:gsub("(.-)$$", helper)))
      return t
    end


    function p.table(frame)
    function p.table(frame)
    local entries = frame.args['entries']:gsub('\n','')
    local entries = frame.args['entries']:gsub('\n','')
    local fields = lines(entries)
    return table.concat(fields, ' ////////// ')
    --[[local result = "0"
    --[[local result = "0"
    for var=1,tonumber(frame.args[1])-1 do
    for var=1,tonumber(frame.args[1])-1 do
    Line 8: Line 21:
    end
    end
    return result]]--
    return result]]--
    return '{{#tag:pre|' .. entries .. '}}'
    end
    end


    return p
    return p

    Revision as of 12:33, 11 July 2024

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

    local p = {}
    
    function lines(str)
       local t = {}
       local function helper(line)
          table.insert(t, line)
          return ""
       end
       helper((str:gsub("(.-)$$", helper)))
       return t
    end
    
    
    function p.table(frame)
    	local entries = frame.args['entries']:gsub('\n','')
    	local fields = lines(entries)
    	return table.concat(fields, ' ////////// ')
    	--[[local result = "0"
    	for var=1,tonumber(frame.args[1])-1 do
    		result = result .. "," .. tostring(var)
    	end
    	return result]]--
    end
    
    return p