Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
a36ee0ad
Commit
a36ee0ad
authored
Dec 08, 2016
by
Munken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better location for math lexer
parent
f7b09848
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
22 deletions
+21
-22
lib/banzai/filter/syntax_highlight_filter.rb
lib/banzai/filter/syntax_highlight_filter.rb
+0
-22
lib/rouge/lexers/math.rb
lib/rouge/lexers/math.rb
+21
-0
No files found.
lib/banzai/filter/syntax_highlight_filter.rb
View file @
a36ee0ad
require
'rouge/plugins/redcarpet'
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
Banzai
module
Filter
module
Filter
# HTML Filter to highlight fenced code blocks
# HTML Filter to highlight fenced code blocks
...
...
lib/rouge/lexers/math.rb
0 → 100644
View file @
a36ee0ad
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment