Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function init(): void {
for (const a of select.all(`a[href]:not(.${linkifiedURLClass})`)) {
applyToLink(a, location.href);
}
}
function parseDescription(description: string): DocumentFragment {
const descriptionElement = <span>{description}</span>;
domFormatters.linkifyIssues(descriptionElement, {
baseUrl: 'https://github.com',
user: 'sindresorhus',
repository: 'refined-github'
});
domFormatters.linkifyURLs(descriptionElement);
domFormatters.parseBackticks(descriptionElement);
for (const a of select.all('a', descriptionElement)) {
applyToLink(a);
}
return descriptionElement;
}