summaryrefslogtreecommitdiff
path: root/lib/rouge
diff options
context:
space:
mode:
authorMunken <mm.munk@gmail.com>2016-12-08 23:13:44 +0000
committerMunken <mm.munk@gmail.com>2016-12-08 23:13:44 +0000
commita36ee0ad4400b7e38bfa33ae99838dcb9527e870 (patch)
tree0235728939bc771052b2e5be3588fb609ca8ee76 /lib/rouge
parentf7b09848c558b1a44571f27a9534c02c0501f181 (diff)
downloadgitlab-ce-a36ee0ad4400b7e38bfa33ae99838dcb9527e870.tar.gz
Better location for math lexer
Diffstat (limited to 'lib/rouge')
-rw-r--r--lib/rouge/lexers/math.rb21
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..ae980da8283
--- /dev/null
+++ b/lib/rouge/lexers/math.rb
@@ -0,0 +1,21 @@
+module Rouge
+ module Lexers
+ class Math < Lexer
+ title "Plain Text"
+ 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 \ No newline at end of file