Sha256: 71a4696fab539c8dc59b83b16a8e44be597a50d7d22cd604c834577ead43dcac

Contents?: true

Size: 446 Bytes

Versions: 9

Compression:

Stored size: 446 Bytes

Contents

# -*- coding: utf-8 -*- #

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

9 entries across 9 versions & 1 rubygems

Version Path
rouge-1.7.7 lib/rouge/lexers/plain_text.rb
rouge-1.7.4 lib/rouge/lexers/plain_text.rb
rouge-1.7.3 lib/rouge/lexers/plain_text.rb
rouge-1.7.2 lib/rouge/lexers/plain_text.rb
rouge-1.7.1 lib/rouge/lexers/plain_text.rb
rouge-1.7.0 lib/rouge/lexers/plain_text.rb
rouge-1.6.2 lib/rouge/lexers/plain_text.rb
rouge-1.6.1 lib/rouge/lexers/plain_text.rb
rouge-1.5.1 lib/rouge/lexers/plain_text.rb