|
|
@ -65,7 +65,10 @@ export class Autolinks implements Disposable { |
|
|
|
if (!isCacheable(ref)) continue; |
|
|
|
|
|
|
|
if (ref.messageRegex === undefined) { |
|
|
|
ref.messageRegex = new RegExp(`(?<=^|\\s|\\()(${ref.prefix}([0-9]+))\\b`, 'g'); |
|
|
|
ref.messageRegex = new RegExp( |
|
|
|
`(?<=^|\\s|\\()(${ref.prefix}([${ref.alphanumeric ? '\\w' : '0-9'}]+))\\b`, |
|
|
|
ref.ignoreCase ? 'gi' : 'g' |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
do { |
|
|
@ -127,8 +130,10 @@ export class Autolinks implements Disposable { |
|
|
|
try { |
|
|
|
if (ref.messageMarkdownRegex === undefined) { |
|
|
|
ref.messageMarkdownRegex = new RegExp( |
|
|
|
`(?<=^|\\s|\\()(${Strings.escapeMarkdown(ref.prefix).replace(/\\/g, '\\\\')}([0-9]+))\\b`, |
|
|
|
'g' |
|
|
|
`(?<=^|\\s|\\()(${Strings.escapeMarkdown(ref.prefix).replace(/\\/g, '\\\\')}([${ |
|
|
|
ref.alphanumeric ? '\\w' : '0-9' |
|
|
|
}]+))\\b`,
|
|
|
|
ref.ignoreCase ? 'gi' : 'g' |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|