Sha256: 44c762947c08479b4e893a111b99456aee514b1430441d090f1d072099f5f466

Contents?: true

Size: 1.01 KB

Versions: 6915

Compression:

Stored size: 1.01 KB

Contents

module CodeRay
module Scanners
  
  class Taskpaper < Scanner
    
    register_for :taskpaper
    file_extension 'taskpaper'
    
  protected
    
    def scan_tokens encoder, options
      until eos?
        if match = scan(/\S.*:.*$/)                  # project
          encoder.text_token(match, :namespace)
        elsif match = scan(/-.+@done.*/)             # completed task
          encoder.text_token(match, :done)
        elsif match = scan(/-(?:[^@\n]+|@(?!due))*/) # task
          encoder.text_token(match, :plain)
        elsif match = scan(/@due.*/)                 # comment
          encoder.text_token(match, :important)
        elsif match = scan(/.+/)                     # comment
          encoder.text_token(match, :comment)
        elsif match = scan(/\s+/)                    # space
          encoder.text_token(match, :space)
        else                                         # other
          encoder.text_token getch, :error
        end
      end
      
      encoder
    end
    
  end
  
end
end

Version data entries

6,915 entries across 6,903 versions & 70 rubygems

Version Path
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
chess_engine-0.0.2 vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
chess_engine-0.0.1 vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
xaiml-0.1.3 vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
alimentos-alu0100945645-0.1.0 vendor/bundle/ruby/2.3.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
alimentos-alu0100945645-1.0.0 vendor/bundle/ruby/2.3.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
xaiml-0.1.2 vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
xaiml-0.1.1 vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
xaiml-0.1.0 vendor/bundle/ruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
logstash-filter-device_detection-1.0.7-java vendor/bundle/jruby/1.9/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
mrcooper-logstash-output-azuresearch-0.2.2 vendor/jruby/2.5.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
monero_wallet_gen-0.1.0 vendor/bundle/ruby/2.3.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
sb_prime_table-0.1.1 vendor/bundle/ruby/2.4.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
sb_prime_table-0.1.0 vendor/bundle/ruby/2.4.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
comiditaULL-0.1.1 vendor/bundle/ruby/2.3.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
comidita_ull-0.1.1 vendor/bundle/ruby/2.3.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb
comidita_ull-0.1.0 vendor/bundle/ruby/2.3.0/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb