Skip to content

Commit 5fcc1e1

Browse files
committed
shorten after-line text decoration content
1 parent c5f115e commit 5fcc1e1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/extension.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ export function activate(): void {
4747

4848
const shortTitle = thread.title.length > 29 ? thread.title.slice(0, 29) + '…' : thread.title
4949

50-
const describeThread = (title: string) =>
51-
`"${title}" by ${thread.author.displayName || thread.author.username} ${distanceInWordsToNow(
52-
thread.createdAt
53-
)} ago`
50+
const describeThread = (title: string) => `${thread.author.displayName || thread.author.username}: ${title}`
5451

5552
decorations.push({
5653
range: new sourcegraph.Range(
@@ -67,7 +64,7 @@ export function activate(): void {
6764
? thread.inlineURL.slice(thread.inlineURL.lastIndexOf('#'))
6865
: thread.inlineURL
6966
: undefined,
70-
hoverMessage: ' ' + describeThread(thread.title),
67+
hoverMessage: `${distanceInWordsToNow(thread.createdAt)} ago`,
7168
dark: {
7269
color: '#0d70e0',
7370
backgroundColor: 'rgba(28, 126, 214, 0.15)',

0 commit comments

Comments
 (0)