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
Jérome Perrin
gitlab-ce
Commits
681b5af5
Commit
681b5af5
authored
8 years ago
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do this thing in a clearer way
parent
95d6174a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lib/gitlab/highlight.rb
lib/gitlab/highlight.rb
+6
-3
No files found.
lib/gitlab/highlight.rb
View file @
681b5af5
...
...
@@ -28,11 +28,14 @@ module Gitlab
end
def
highlight
(
text
,
continue:
true
,
plain:
false
)
lexer
=
@lexer
if
plain
@formatter
.
format
(
Rouge
::
Lexers
::
PlainText
.
lex
(
text
)).
html_safe
else
@formatter
.
format
(
@lexer
.
lex
(
text
,
continue:
continue
)).
html_safe
lexer
=
Rouge
::
Lexers
::
PlainText
continue
=
false
end
@formatter
.
format
(
@lexer
.
lex
(
text
,
continue:
continue
)).
html_safe
rescue
@formatter
.
format
(
Rouge
::
Lexers
::
PlainText
.
lex
(
text
)).
html_safe
end
...
...
This diff is collapsed.
Click to expand it.
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