Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function linkifyIssues(element: Element, options: Partial = {}): void {
const linkified = linkifyIssuesCore(element.textContent!, {
user: currentRepo.ownerName ?? '/',
repository: currentRepo.repoName ?? '/',
type: 'dom',
baseUrl: '',
...options,
attributes: {
rel: 'noreferrer noopener',
class: linkifiedURLClass, // Necessary to avoid also shortening the links
...options.attributes
}
});
if (linkified.children.length === 0) { // Children are <a>
return;
}
// Enable native issue title fetch</a>