diff --git a/lib/banzai/filter/syntax_highlight_filter.rb b/lib/banzai/filter/syntax_highlight_filter.rb index 278d4d92d08..e7f6b715ba8 100644 --- a/lib/banzai/filter/syntax_highlight_filter.rb +++ b/lib/banzai/filter/syntax_highlight_filter.rb @@ -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 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