BigW Consortium Gitlab

math.rb 416 Bytes
Newer Older
1 2 3
module Rouge
  module Lexers
    class Math < Lexer
4
      title "A passthrough lexer used for LaTeX input"
5 6 7 8 9
      desc "A boring lexer that doesn't highlight anything"

      tag 'math'
      mimetypes 'text/plain'

10
      default_options token: 'Text'
11 12 13 14 15 16 17 18 19 20

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

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