@@ -10,6 +10,7 @@ import { Repository } from './repository';
10
10
import { throttle } from './decorators' ;
11
11
import { BlameInformation } from './git' ;
12
12
import { fromGitUri , isGitUri } from './uri' ;
13
+ import { emojify , ensureEmojis } from './emoji' ;
13
14
14
15
function lineRangesContainLine ( changes : readonly TextEditorChange [ ] , lineNumber : number ) : boolean {
15
16
return changes . some ( c => c . modified . startLineNumber <= lineNumber && lineNumber < c . modified . endLineNumberExclusive ) ;
@@ -171,7 +172,7 @@ export class GitBlameController {
171
172
const templateTokens = {
172
173
hash : blameInformation . hash ,
173
174
hashShort : blameInformation . hash . substring ( 0 , 8 ) ,
174
- subject : blameInformation . subject ?? '' ,
175
+ subject : emojify ( blameInformation . subject ?? '' ) ,
175
176
authorName : blameInformation . authorName ?? '' ,
176
177
authorEmail : blameInformation . authorEmail ?? '' ,
177
178
authorDate : new Date ( blameInformation . authorDate ?? new Date ( ) ) . toLocaleString ( ) ,
@@ -203,7 +204,7 @@ export class GitBlameController {
203
204
markdownString . appendMarkdown ( '\n\n' ) ;
204
205
}
205
206
206
- markdownString . appendMarkdown ( `${ blameInformation . subject } \n\n` ) ;
207
+ markdownString . appendMarkdown ( `${ emojify ( blameInformation . subject ?? '' ) } \n\n` ) ;
207
208
markdownString . appendMarkdown ( `---\n\n` ) ;
208
209
209
210
markdownString . appendMarkdown ( `[$(eye) View Commit](command:git.blameStatusBarItem.viewCommit?${ encodeURIComponent ( JSON . stringify ( [ documentUri , blameInformation . hash ] ) ) } "${ l10n . t ( 'View Commit' ) } ")` ) ;
@@ -259,6 +260,10 @@ export class GitBlameController {
259
260
return resourceBlameInformation ;
260
261
}
261
262
263
+ // Ensure that the emojis are loaded. We will
264
+ // use them when formatting the blame information.
265
+ await ensureEmojis ( ) ;
266
+
262
267
// Get blame information for the resource and cache it
263
268
const blameInformation = await repository . blame2 ( resource . fsPath , commit ) ?? [ ] ;
264
269
this . _repositoryBlameCache . setBlameInformation ( repository , resource , commit , blameInformation ) ;
0 commit comments