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
Tatuya Kamada
gitlab-ce
Commits
51f48392
Commit
51f48392
authored
Nov 17, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix type error if there is a different location hash
parent
d412abd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
app/assets/javascripts/tree.js.coffee
app/assets/javascripts/tree.js.coffee
+4
-4
No files found.
app/assets/javascripts/tree.js.coffee
View file @
51f48392
...
...
@@ -40,12 +40,12 @@ $ ->
# "#L12" and "#L34-56" supported
highlightBlobLines
=
->
if
window
.
location
.
hash
isnt
""
matches
=
window
.
location
.
hash
.
match
/\#L(\d+)(\-(\d+))?/
first_line
=
parseInt
matches
[
1
]
last_line
=
parseInt
matches
[
3
]
matches
=
window
.
location
.
hash
.
match
(
/\#L(\d+)(\-(\d+))?/
)
first_line
=
parseInt
(
matches
?
[
1
])
last_line
=
parseInt
(
matches
?
[
3
])
unless
isNaN
first_line
last_line
=
first_line
if
isNaN
last_line
last_line
=
first_line
if
isNaN
(
last_line
)
$
(
"#tree-content-holder .highlight .line"
).
removeClass
(
"hll"
)
$
(
"#LC
#{
line
}
"
).
addClass
(
"hll"
)
for
line
in
[
first_line
..
last_line
]
$
(
"#L
#{
first_line
}
"
).
ScrollTo
()
...
...
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