Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

Commit 50d6c5d

Browse files
committed
fix: add spacing between end-of-line and decoration attachment
fix (in browser extension) sourcegraph/sourcegraph#567
1 parent 6015fa8 commit 50d6c5d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/libs/code_intelligence/extensions.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ export const applyDecoration = (
184184

185185
const linkTo = (url: string) => (e: HTMLElement): HTMLElement => {
186186
const link = document.createElement('a')
187-
link.className = 'sourcegraph-extension-element'
188187
link.setAttribute('href', url)
189188

190189
// External URLs should open in a new tab, whereas relative URLs
@@ -200,12 +199,12 @@ export const applyDecoration = (
200199
}
201200

202201
const after = document.createElement('span')
203-
after.className = 'sourcegraph-extension-element'
204202
after.style.backgroundColor = style.backgroundColor || null
205203
after.textContent = decoration.after.contentText || null
206204
after.title = decoration.after.hoverMessage || ''
207205

208206
const annotation = decoration.after.linkURL ? linkTo(decoration.after.linkURL)(after) : after
207+
annotation.className = 'sourcegraph-extension-element line-decoration-attachment'
209208
codeElement.appendChild(annotation)
210209

211210
disposables.push({

src/shared/extensions-client-common.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,7 @@ $body-color-dark: #f2f4f8;
142142
}
143143
}
144144
}
145+
146+
.line-decoration-attachment {
147+
margin-left: 0.25rem;
148+
}

0 commit comments

Comments
 (0)