Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into report-viewer/upgr…
Browse files Browse the repository at this point in the history
…ade-eslint-config
  • Loading branch information
Kr0nox committed Dec 17, 2024
2 parents 1435c14 + 4bd4024 commit 02f5ef5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
:matches="matchesPerFile[file.fileName]"
:highlight-language="highlightLanguage"
class="mt-1 first:mt-0"
:base-code-matches="baseCodeMatches"
:base-code-matches="
baseCodeMatches.filter((match) => slash(match.fileName) === file.fileName)
"
@match-selected="(match: Match) => $emit('matchSelected', match)"
/>
</VueDraggableNext>
Expand All @@ -50,6 +52,7 @@ import { FileSortingOptions } from '@/model/ui/FileSortingOptions'
import { store } from '@/stores/store'
import type { BaseCodeMatch } from '@/model/BaseCodeReport'
import type { Match } from '@/model/Match'
import slash from 'slash'

library.add(faCompressAlt)

Expand Down
8 changes: 8 additions & 0 deletions report-viewer/src/model/MatchInSingleFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,12 @@ export class MatchInSingleFile {
return this._match.endInSecond.column
}
}

get fileName(): string {
if (this._index === 1) {
return this._match.firstFile
} else {
return this._match.secondFile
}
}
}

0 comments on commit 02f5ef5

Please sign in to comment.