ソースを参照

Fixes #2380 allow `{` to start an autolink

main
Eric Amodio 2年前
コミット
f2e5d4808f
2個のファイルの変更10行の追加3行の削除
  1. +5
    -0
      CHANGELOG.md
  2. +5
    -3
      src/annotations/autolinks.ts

+ 5
- 0
CHANGELOG.md ファイルの表示

@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
## [Unreleased]
### Fixed
- Fixes [#2380](https://github.com/gitkraken/vscode-gitlens/issues/2380) - Autolink fails with curly braces
- Fixes [#2381](https://github.com/gitkraken/vscode-gitlens/issues/2381) - can't use scrollbar in 'Commit Graph' view
## [13.1.1] - 2022-11-21
### Fixed

+ 5
- 3
src/annotations/autolinks.ts ファイルの表示

@ -443,19 +443,21 @@ function ensureCachedRegex(ref: CacheableAutolinkReference, outputFormat: 'html'
if (outputFormat === 'markdown' && ref.messageMarkdownRegex == null) {
// Extra `\\\\` in `\\\\\\[` is because the markdown is escaped
ref.messageMarkdownRegex = new RegExp(
`(?<=^|\\s|\\(|\\\\\\[)(${escapeRegex(encodeHtmlWeak(escapeMarkdown(ref.prefix)))}(${
`(?<=^|\\s|\\(|\\[|\\{)(${escapeRegex(encodeHtmlWeak(escapeMarkdown(ref.prefix)))}(${
ref.alphanumeric ? '\\w' : '\\d'
}+))\\b`,
ref.ignoreCase ? 'gi' : 'g',
);
} else if (outputFormat === 'html' && ref.messageHtmlRegex == null) {
ref.messageHtmlRegex = new RegExp(
`(?<=^|\\s|\\(|\\[)(${escapeRegex(encodeHtmlWeak(ref.prefix))}(${ref.alphanumeric ? '\\w' : '\\d'}+))\\b`,
`(?<=^|\\s|\\(|\\[|\\{)(${escapeRegex(encodeHtmlWeak(ref.prefix))}(${
ref.alphanumeric ? '\\w' : '\\d'
}+))\\b`,
ref.ignoreCase ? 'gi' : 'g',
);
} else if (ref.messageRegex == null) {
ref.messageRegex = new RegExp(
`(?<=^|\\s|\\(|\\[)(${escapeRegex(ref.prefix)}(${ref.alphanumeric ? '\\w' : '\\d'}+))\\b`,
`(?<=^|\\s|\\(|\\[|\\{)(${escapeRegex(ref.prefix)}(${ref.alphanumeric ? '\\w' : '\\d'}+))\\b`,
ref.ignoreCase ? 'gi' : 'g',
);
}

読み込み中…
キャンセル
保存