Spring til indhold

Modul:Reference: Forskelle mellem versioner

176 bytes tilføjet ,  10. februar 2021
ingen redigeringsopsummering
No edit summary
No edit summary
Linje 230: Linje 230:


       local stykbeskrivelse = stykke
       local stykbeskrivelse = stykke
     


       if (string.match(stykke, ",") ) then
       if (string.match(stykke, ",") ) then
    -- skal loopes - kan have minimum 6 elementer
    -- skal loopes - kan have minimum 6 elementer
    -- loop table
    -- loop table
    return stykke .. 'stykke har ,'
 
    -- iterator = mw.text.gsplit( stykke, ',', plain )
 
    local text
 
    for k in mw.text.gsplit( stykke, ',', plain ) do
      text = text .. ' 1 '
    end
 
    return stykke .. 'stykke har , ' .. text
       end
       end
        
        
Linje 246: Linje 257:
       -- punkter i stk 2658
       -- punkter i stk 2658
         forstestykke, punkt = stykke:match("(.+).(.+)")
         forstestykke, punkt = stykke:match("(.+).(.+)")
       
 
         -- fjern punktum
         -- fjern punktum
         forstestykke = forstestykke:gsub("[%c%p%s]", "")
         forstestykke = forstestykke:gsub("[%c%p%s]", "")