diff options
-rw-r--r-- | lib/coderay/encoders/token_class_filter.rb | 5 |
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 |