Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr0nox committed Jul 29, 2023
1 parent 2db93df commit 2e85b93
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions report-viewer/src/model/MatchInSingleFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ import type { Match } from './Match'

/**
* Describes a match in a single file.
* @property start - Starting line of the match.
* @property end - Ending line of the match.
* @property linked_panel - The files container containing the file of the second submission to which this is matched.
* @property linked_file - The file name containing the same match in the second submission.
* @property linked_line - The start of the match in the second file.
* @property color - Color of the match.
*/
export class MatchInSingleFile {
private readonly _match: Match
Expand All @@ -18,10 +12,16 @@ export class MatchInSingleFile {
this._index = index
}

/**
* The match object.
*/
get match(): Match {
return this._match
}

/**
* The start line of the match.
*/
get start(): number {
if (this._index === 1) {
return this._match.startInFirst
Expand All @@ -30,19 +30,14 @@ export class MatchInSingleFile {
}
}

/**
* The end line of the match.
*/
get end(): number {
if (this._index === 1) {
return this._match.endInFirst
} else {
return this._match.endInSecond
}
}

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

0 comments on commit 2e85b93

Please sign in to comment.