@@ -4,7 +4,6 @@ import { DiffWithCommand, OpenCommitInRemoteCommand, ShowQuickCommitDetailsComma
44import { IThemeConfig , themeDefaults } from '../configuration' ;
55import { GlyphChars } from '../constants' ;
66import { CommitFormatter , GitCommit , GitDiffChunkLine , GitService , GitUri , ICommitFormatOptions } from '../gitService' ;
7- const Datauri = require ( 'datauri' ) ;
87
98interface IHeatmapConfig {
109 enabled : boolean ;
@@ -26,25 +25,6 @@ export const endOfLineIndex = 1000000;
2625const escapeMarkdownRegEx = / [ ` \> \# \* \_ \- \+ \. ] / g;
2726// const sampleMarkdown = '## message `not code` *not important* _no underline_ \n> don\'t quote me \n- don\'t list me \n+ don\'t list me \n1. don\'t list me \nnot h1 \n=== \nnot h2 \n---\n***\n---\n___';
2827
29- const linkIconSvg = `<?xml version="1.0" encoding="utf-8"?>
30- <svg width="12" height="18" version="1.1" xmlns="http://www.w3.org/2000/svg">
31- <path fill="\${color}" d="m11,14l1,0l0,3c0,0.55 -0.45,1 -1,1l-10,0c-0.55,0 -1,-0.45 -1,-1l0,-10c0,-0.55 0.45,-1 1,-1l3,0l0,1l-3,0l0,10l10,0l0,-3l0,0zm-5,-8l2.25,2.25l-3.25,3.25l1.5,1.5l3.25,-3.25l2.25,2.25l0,-6l-6,0l0,0z" />
32- </svg>` ;
33-
34- const themeForegroundColor = '#a0a0a0' ;
35- let linkIconDataUri : string | undefined ;
36-
37- function getLinkIconDataUri ( foregroundColor : string ) : string {
38- if ( linkIconDataUri === undefined || foregroundColor !== themeForegroundColor ) {
39- const datauri = new Datauri ( ) ;
40- datauri . format ( '.svg' , Strings . interpolate ( linkIconSvg , { color : foregroundColor } ) ) ;
41- linkIconDataUri = datauri . content ;
42- foregroundColor = themeForegroundColor ;
43- }
44-
45- return linkIconDataUri ! ;
46- }
47-
4828export class Annotations {
4929
5030 static applyHeatmap ( decoration : DecorationOptions , date : Date , now : number ) {
@@ -85,7 +65,7 @@ export class Annotations {
8565 }
8666
8767 const openInRemoteCommand = hasRemotes
88- ? `${ ' ' . repeat ( 3 ) } [ } ) ](${ OpenCommitInRemoteCommand . getMarkdownCommandArgs ( commit . sha ) } "Open in Remote")`
68+ ? `${ ' ' . repeat ( 3 ) } [\` ${ GlyphChars . ArrowUpRight } \` ](${ OpenCommitInRemoteCommand . getMarkdownCommandArgs ( commit . sha ) } "Open in Remote")`
8969 : '' ;
9070
9171 const markdown = new MarkdownString ( `[\`${ commit . shortSha } \`](${ ShowQuickCommitDetailsCommand . getMarkdownCommandArgs ( commit . sha ) } "Show Commit Details") __${ commit . author } __, ${ commit . fromNow ( ) } _(${ commit . formatDate ( dateFormat ) } )_ ${ openInRemoteCommand } ${ message } ` ) ;
0 commit comments