|
@ -61,7 +61,9 @@ export class Autolinks implements Disposable { |
|
|
|
|
|
|
|
|
private onConfigurationChanged(e?: ConfigurationChangeEvent) { |
|
|
private onConfigurationChanged(e?: ConfigurationChangeEvent) { |
|
|
if (configuration.changed(e, 'autolinks')) { |
|
|
if (configuration.changed(e, 'autolinks')) { |
|
|
this._references = this.container.config.autolinks ?? []; |
|
|
|
|
|
|
|
|
const autolinks = configuration.get('autolinks'); |
|
|
|
|
|
// Since VS Code's configuration objects are live we need to copy them to avoid writing back to the configuration
|
|
|
|
|
|
this._references = autolinks != null ? autolinks.map(a => ({ ...a })) : []; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -199,6 +201,7 @@ export class Autolinks implements Disposable { |
|
|
issuesOrPullRequests?: Map<string, IssueOrPullRequest | PromiseCancelledError | undefined>, |
|
|
issuesOrPullRequests?: Map<string, IssueOrPullRequest | PromiseCancelledError | undefined>, |
|
|
): ref is CacheableAutolinkReference | DynamicAutolinkReference { |
|
|
): ref is CacheableAutolinkReference | DynamicAutolinkReference { |
|
|
if (isDynamic(ref)) return true; |
|
|
if (isDynamic(ref)) return true; |
|
|
|
|
|
if (!ref.prefix || !ref.url) return false; |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
if (ref.messageMarkdownRegex == null) { |
|
|
if (ref.messageMarkdownRegex == null) { |
|
|