Module:inline: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 4: Line 4:
     local args = {}
     local args = {}
     local i, key, value = 0
     local i, key, value = 0
    mw.log(type(i))
    mw.log(i)
    mw.log(type(term))
    mw.log(term)
    mw.log(#term)
     while i < #term do
     while i < #term do
     mw.log("im in the matrix")
     mw.log("im in the matrix")
         key, value, i = mw.ustring.match(term, "<([a-zA-Z]+):([^>]+)>()")
         key, value, i = mw.ustring.match(term, "<([a-zA-Z]+):([^>]+)>()")
         if key and value then args[key] = value end  
         if key and value then args[key] = value else break end  
     end
     end
     return mw.ustring.gsub(term, "<[a-zA-Z]+:[^>]+>", ""), args
     return mw.ustring.gsub(term, "<[a-zA-Z]+:[^>]+>", ""), args