Editing Module:Tt/Draft
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 80: | Line 80: | ||
local full = tx | local full = tx | ||
local result = tx | local result = tx | ||
for display in string.gmatch(full, | |||
for display, tooltip in string.gmatch(full, '<span class="text%-tooltip hover%-tooltip">(.-)<span class="tt%-content">(.-)</span></span>') do | |||
local escTooltip = tooltip:gsub("([^%w])", "%%%1") | |||
local escDisplay = display:gsub("([^%w])", "%%%1") | local escDisplay = display:gsub("([^%w])", "%%%1") | ||
search_str = '<span class="text%-tooltip hover%-tooltip">(' .. escDisplay .. ')<span class="tt%-content">' .. escTooltip .. '</span></span><span[^>]+><span[^>]+>' .. escDisplay .. '</span><span[^>]+>' .. escTooltip .. '</span></span>' | |||
result = result:gsub(search_str, display) | result = result:gsub(search_str, display) | ||
end | end | ||