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
Kazuhiko Shiozaki
gitlab-ce
Commits
89ab7e79
Commit
89ab7e79
authored
Jan 30, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Highlight code search results
parent
3fafac3e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/views/search/results/_blob.html.haml
app/views/search/results/_blob.html.haml
+1
-2
app/views/shared/_file_hljs.html.haml
app/views/shared/_file_hljs.html.haml
+2
-1
No files found.
app/views/search/results/_blob.html.haml
View file @
89ab7e79
...
...
@@ -6,5 +6,4 @@
%strong
=
blob
.
filename
.file-content.code.term
%div
{
class:
user_color_scheme_class
}
=
raw
blob
.
colorize
(
formatter: :gitlab
,
options:
{
first_line_number:
blob
.
startline
}
)
=
render
'shared/file_hljs'
,
blob:
blob
,
first_line_number:
blob
.
startline
app/views/shared/_file_hljs.html.haml
View file @
89ab7e79
%div
.highlighted-data
{
class:
user_color_scheme_class
}
.line-numbers
-
blob
.
data
.
lines
.
size
.
times
do
|
index
|
-
i
=
index
+
1
-
offset
=
defined?
(
first_line_number
)
?
first_line_number
:
1
-
i
=
index
+
offset
=
link_to
"#L
#{
i
}
"
,
id:
"L
#{
i
}
"
,
rel:
"#L
#{
i
}
"
do
%i
.icon-link
=
i
...
...
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