view .svn/pristine/ff/ff7c7a78022ec834d13d1e81c3b7d935dfcd48bf.svn-base @ 1322:596e34bffcc7 redmine-2.2-integration

Temporarily remove "Mature projects", it doesn't work well enough. Add Search Projects link
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Wed, 19 Jun 2013 16:18:23 +0100
parents cbb26bc654de
children
line wrap: on
line source
module CodeRay
module Encoders
  
  load :token_kind_filter
  
  # A simple Filter that removes all tokens of the :comment kind.
  # 
  # Alias: +remove_comments+
  # 
  # Usage:
  #  CodeRay.scan('print # foo', :ruby).comment_filter.text
  #  #-> "print "
  # 
  # See also: TokenKindFilter, LinesOfCode
  class CommentFilter < TokenKindFilter
    
    register_for :comment_filter
    
    DEFAULT_OPTIONS = superclass::DEFAULT_OPTIONS.merge \
      :exclude => [:comment, :docstring]
    
  end
  
end
end