Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Upstream
Gitea
Commits
9444135f
Unverified
Commit
9444135f
authored
3 years ago
by
Jimmy Praet
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix source code line highlighting (#18729)
Co-authored-by:
wxiaoguang
<
wxiaoguang@gmail.com
>
parent
91ac65db
main
release/v1.17
release/v1.18
v1.19.0-dev
v1.18.1
v1.18.0
v1.18.0-rc1
v1.18.0-rc0
v1.18.0-dev
v1.17.4
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.17.0-rc1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
web_src/js/features/repo-code.js
+5
-2
web_src/js/features/repo-code.js
with
5 additions
and
2 deletions
+5
-2
web_src/js/features/repo-code.js
View file @
9444135f
...
...
@@ -16,11 +16,14 @@ function selectRange($list, $select, $from) {
const
$issue
=
$
(
'
a.ref-in-new-issue
'
);
const
$copyPermalink
=
$
(
'
a.copy-line-permalink
'
);
if
(
$issue
.
length
===
0
||
$copyPermalink
.
length
===
0
)
{
if
(
$copyPermalink
.
length
===
0
)
{
return
;
}
const
updateIssueHref
=
function
(
anchor
)
{
const
updateIssueHref
=
function
(
anchor
)
{
if
(
$issue
.
length
===
0
)
{
return
;
}
let
href
=
$issue
.
attr
(
'
href
'
);
href
=
`
${
href
.
replace
(
/%23L
\d
+$|%23L
\d
+-L
\d
+$/
,
''
)}
%23
${
anchor
}
`
;
$issue
.
attr
(
'
href
'
,
href
);
...
...
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
Menu
Projects
Groups
Snippets
Help