diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-12-16 18:03:24 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-12-16 18:03:24 -0200 |
commit | 785459d1617887ad8c3cd530c6cd79c33336fc41 (patch) | |
tree | eaea702b7a427d14f4ffd689da23c6472e4f9b58 /lib/rouge/lexers/math.rb | |
parent | dbe2ac8ccc07f53669214eb954489a6cb233d4e9 (diff) | |
parent | b3d5ed62de3519b42dbcef2973c189467588fc36 (diff) | |
download | gitlab-ce-785459d1617887ad8c3cd530c6cd79c33336fc41.tar.gz |
Merge remote-tracking branch 'origin/master' into bitbucket-oauth2
Diffstat (limited to 'lib/rouge/lexers/math.rb')
-rw-r--r-- | lib/rouge/lexers/math.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/rouge/lexers/math.rb b/lib/rouge/lexers/math.rb new file mode 100644 index 00000000000..80784adfd76 --- /dev/null +++ b/lib/rouge/lexers/math.rb @@ -0,0 +1,21 @@ +module Rouge + module Lexers + class Math < Lexer + title "A passthrough lexer used for LaTeX input" + desc "A boring lexer that doesn't highlight anything" + + tag 'math' + 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 |