From 08d88c38cd44618b1acb6d81eeff1ee793ff9f4e Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Fri, 27 Aug 2010 15:54:49 -0500 Subject: [PATCH] Fixed markings to handle lines that have embedded newlines properly --- WeightsWatcher.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua index 9d36085..e98151e 100644 --- a/WeightsWatcher.lua +++ b/WeightsWatcher.lua @@ -586,21 +586,21 @@ function WeightsWatcher.displayItemStats(tooltip, ttname) textL = WeightsWatcher.preprocess(origTextL:lower()) if rawget(ww_unparsed_lines, textL) then if showDebugInfo then - ttleft:SetText(string.format("%s |cffff00ff(U)|r", origTextL)) + ttleft:SetText(string.format("%s |cffff00ff(U)|r", string.gsub(origTextL, "(.)([\r\n]\+)", "%1 |cffff00ff(U)|r%2"))) else - ttleft:SetText(string.format("%s |cffff0000*|r", origTextL)) + ttleft:SetText(string.format("%s |cffff0000*|r", string.gsub(origTextL, "(.)([\r\n]\+)", "%1 |cffff0000*|r%2"))) end numUnweightedEffects = numUnweightedEffects + 1 elseif rawget(ww_ignored_lines, textL) then if showDebugInfo then - ttleft:SetText(string.format("%s |cffffff00(I)|r", origTextL)) + ttleft:SetText(string.format("%s |cffffff00(I)|r", string.gsub(origTextL, "(.)([\r\n]\+)", "%1 |cffffff00(I)|r%2"))) end elseif rawget(ww_temp_ignored_lines, textL) then if showDebugInfo then - ttleft:SetText(string.format("%s |cffffff00(TI)|r", origTextL)) + ttleft:SetText(string.format("%s |cffffff00(TI)|r", string.gsub(origTextL, "(.)([\r\n]\+)", "%1 |cffffff00(TI)|r%2"))) end elseif rawget(ww_unweighted_lines, textL) then - ttleft:SetText(string.format("%s |cffff0000*|r", origTextL)) + ttleft:SetText(string.format("%s |cffff0000*|r", string.gsub(origTextL, "(.)([\r\n]\+)", "%1 |cffff0000*|r%2"))) numUnweightedEffects = numUnweightedEffects + 1 end end -- 1.7.9.5