Better location for math lexer
This commit is contained in:
parent
f7b09848c5
commit
a36ee0ad44
2 changed files with 21 additions and 22 deletions
|
@ -1,27 +1,5 @@
|
|||
require 'rouge/plugins/redcarpet'
|
||||
|
||||
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
|
||||
|
||||
module Banzai
|
||||
module Filter
|
||||
# HTML Filter to highlight fenced code blocks
|
||||
|
|
21
lib/rouge/lexers/math.rb
Normal file
21
lib/rouge/lexers/math.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue