From 58f8c8450b0126a707bd7e4d0aec78683e10db0b Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Mon, 1 Aug 2016 21:21:35 +0200 Subject: [PATCH] big filter refactoring --- util/filter.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/util/filter.lua b/util/filter.lua index cbc252d..61c9772 100644 --- a/util/filter.lua +++ b/util/filter.lua @@ -508,9 +508,17 @@ function private.prettified(components) for _, component in components.post do if component[1] == 'operator' then - prettified.append('|cffffff00'..component[2]..(component[3] or '*')..'|r') + local suffix = '' + if not component[3] then + suffix = '*' + elseif component[3] > 2 then + suffix = component[3] + end + prettified.append('|cffffff00'..component[2]..suffix..'|r') elseif component[1] == 'filter' then - prettified.append('|cffffff00'..component[2]..'|r') + if component[2] ~= 'tooltip' then + prettified.append('|cffffff00'..component[2]..'|r') + end if component[3] then prettified.append('|cffff9218'..component[3]..'|r') end