Unverified Commit 9444135f authored by Jimmy Praet's avatar Jimmy Praet Committed by GitHub
Browse files

Fix source code line highlighting (#18729)

Co-authored-by: default avatarwxiaoguang <wxiaoguang@gmail.com>
Showing with 5 additions and 2 deletions
+5 -2
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment