summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-10-18 17:58:05 +0000
committermurphy <murphy@rubychan.de>2009-10-18 17:58:05 +0000
commit6a93658b67deb2e12088264dd2da60a37834b0de (patch)
treed4e94da96e4fdf4f682d87f970379d53ac6b1309
parent0321aac7370e0595480ad68d3a6b712511d30efb (diff)
downloadcoderay-6a93658b67deb2e12088264dd2da60a37834b0de.tar.gz
TokenClassFilter: Support for :exclud => :all.
-rw-r--r--lib/coderay/encoders/token_class_filter.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/coderay/encoders/token_class_filter.rb b/lib/coderay/encoders/token_class_filter.rb
index 69e7c82..97c75b7 100644
--- a/lib/coderay/encoders/token_class_filter.rb
+++ b/lib/coderay/encoders/token_class_filter.rb
@@ -21,8 +21,9 @@ module Encoders
end
def text_token text, kind
- [text, kind] if !@exclude.include?(kind) &&
- (@include == :all || @include.include?(kind))
+ [text, kind] if \
+ (@include == :all || @include.include?(kind)) &&
+ !(@exclude == :all || @exclude.include?(kind))
end
end