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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
c779d990
Commit
c779d990
authored
Jun 10, 2021
by
Gary Holtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing position of metric
parent
3dabcb3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/gitlab/highlight.rb
lib/gitlab/highlight.rb
+2
-2
No files found.
lib/gitlab/highlight.rb
View file @
c779d990
...
...
@@ -32,8 +32,6 @@ module Gitlab
def
highlight
(
text
,
continue:
false
,
plain:
false
,
context:
{})
@context
=
context
add_highlight_attempt_metric
plain
||=
self
.
class
.
too_large?
(
text
.
length
)
highlighted_text
=
highlight_text
(
text
,
continue:
continue
,
plain:
plain
)
...
...
@@ -72,6 +70,8 @@ module Gitlab
end
def
highlight_rich
(
text
,
continue:
true
)
add_highlight_attempt_metric
tag
=
lexer
.
tag
tokens
=
lexer
.
lex
(
text
,
continue:
continue
)
Timeout
.
timeout
(
timeout_time
)
{
@formatter
.
format
(
tokens
,
context
.
merge
(
tag:
tag
)).
html_safe
}
...
...
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