mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-10 19:32:02 +00:00
exclude current issue from suggestion
This commit is contained in:
parent
3b0b5d0513
commit
8d30b52fc1
4 changed files with 15 additions and 4 deletions
|
@ -4,11 +4,13 @@ import {getIssueIcon, getIssueColor,isIssueSuggestionsLoaded, fetchIssueSuggesti
|
|||
import {svg} from '../../svg.js'
|
||||
import {createElementFromHTML} from '../../utils/dom.js';
|
||||
import { GET } from '../../modules/fetch.js';
|
||||
import {parseIssueHref} from '../../utils.js'
|
||||
|
||||
async function issueSuggestions(text) {
|
||||
const key = '#';
|
||||
|
||||
const matches = matchIssue(text);
|
||||
const issuePathInfo = parseIssueHref(window.location.href);
|
||||
const matches = matchIssue(text, Number(issuePathInfo.index));
|
||||
if (!matches.length) return {matched: false};
|
||||
|
||||
const ul = document.createElement('ul');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue