Sha256: 28150a9c972802c05b596f6e89ae2098ccca7aed989bfe0a189e23f0627fcc0b

Contents?: true

Size: 419 Bytes

Versions: 14

Compression:

Stored size: 419 Bytes

Contents

module Rouge
  module Lexers
    class PlainText < Lexer
      desc "A boring lexer that doesn't highlight anything"

      tag 'plaintext'
      aliases 'text'
      filenames '*.txt'
      mimetypes 'text/plain'

      default_options :token => 'Text'

      def token
        @token ||= Token[option :token]
      end

      def stream_tokens(string, &b)
        yield self.token, string
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rouge-1.5.0 lib/rouge/lexers/plain_text.rb
rouge-1.4.0 lib/rouge/lexers/plain_text.rb
rouge-1.3.4 lib/rouge/lexers/plain_text.rb
rouge-1.3.3 lib/rouge/lexers/plain_text.rb
rouge-1.3.2 lib/rouge/lexers/plain_text.rb
rouge-1.3.1 lib/rouge/lexers/plain_text.rb
rouge-1.3.0 lib/rouge/lexers/plain_text.rb
rouge-1.2.0 lib/rouge/lexers/plain_text.rb
rouge-1.1.0 lib/rouge/lexers/plain_text.rb
rouge-0.5.4 lib/rouge/lexers/plain_text.rb
rouge-0.5.3 lib/rouge/lexers/plain_text.rb
rouge-0.5.2 lib/rouge/lexers/plain_text.rb
rouge-0.5.1 lib/rouge/lexers/plain_text.rb
rouge-0.5.0 lib/rouge/lexers/plain_text.rb