mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-08-30 14:26:04 +02:00
Fix source code line highlighting (#18729)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
91ac65db5e
commit
9444135ff5
1 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue