Skip to content

Commit d98881e

Browse files
authored
Merge pull request #5 from fraxachun/master
Read filename from title instead of possibly truncated span element
2 parents 30774fc + 84eb3fe commit d98881e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/inject/inject.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/inject/inject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class GitLabTree
166166
const svgElement: HTMLElement = rawFileMetadata.querySelector( 'svg.diff-file-changed-icon' ) as HTMLElement;
167167
const typeRaw: string = svgElement.querySelector( 'use' ).getAttribute('xlink:href').split('#')[1];
168168
const hash: string = rawFileMetadata.querySelector( 'a' ).getAttribute('href');
169-
const filename: string = rawFileMetadata.querySelector( '.diff-changed-file-path' ).textContent.trim();
169+
const filename: string = rawFileMetadata.querySelector( '.diff-changed-file' ).getAttribute('title');
170170
const isCred: boolean = svgElement.classList.contains( 'cred' );
171171

172172
let type: EFileState = EFileState.UPDATED;

0 commit comments

Comments
 (0)