How to use linkify-issues - 1 common examples

To help you get started, we’ve selected a few linkify-issues examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sindresorhus / refined-github / source / libs / dom-formatters.ts View on Github external
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>

linkify-issues

Linkify GitHub issue references

MIT
Latest version published 7 months ago

Package Health Score

59 / 100
Full package analysis

Popular linkify-issues functions