Module:head: Difference between revisions

Added * functionality
m (Moved labels to beginning)
(Added * functionality)
Line 31: Line 31:
if data.head then
if data.head then
head = data.head
head = data.head
head = mw.ustring.gsub(head, "%*([^%*|]+)|([^%*|]+)%*", "[[%1#" .. data.language.name .. "|%2]]")
head = mw.ustring.gsub(head, "%*([^%*]+)%*", "[[%1#" .. data.language.name .. "|%1]]")
elseif mw.ustring.find(head, " ") then
elseif mw.ustring.find(head, " ") then
local pieces = {}
local pieces = {}