Module:Diff/sandbox: Difference between revisions

Content deleted Content added
test
test
Line 112:
end
end
diff_buffer = string.gsub(diff_buffer, "<ins></ins>", "")
diff_buffer = string.gsub(diff_buffer, "<del></del>", "")
return diff_buffer
end
Line 204 ⟶ 202:
function wikiDiff(old, new, separator)
local tokens = diff(old, new, separator)
--[[local root = mw.html.create('')
 
local token, status
Line 273 ⟶ 271:
end
end
return root]]--
return tokens
end
 
function main(frame)
local wD return= wikiDiff(mw.text.unstrip(mw.text.decode(frame.args[1])), mw.text.decode(mw.text.unstrip(frame.args[2])), frame.args[3] or '[%s%.:-]+')
wD = string.gsub(wD, '</ins><ins class="diffchange diffchange-inline" style="background: #d8ecff; padding: 0.25em 0; font-weight: bold; text-decoration: initial;">', "")
return wD
end