RED-3958: return annotation value for false recommendations
This commit is contained in:
parent
281d03de25
commit
e484927f61
@ -501,19 +501,26 @@ export class AnnotationActionsService {
|
||||
}
|
||||
|
||||
private _getFalsePositiveText(annotation: AnnotationWrapper) {
|
||||
if (annotation.canBeMarkedAsFalsePositive) {
|
||||
let text: string;
|
||||
if (annotation.hasTextAfter) {
|
||||
text = getFirstRelevantTextPart(annotation.textAfter, 'FORWARD');
|
||||
return text ? (annotation.value + text).trim() : annotation.value;
|
||||
}
|
||||
if (annotation.hasTextAfter) {
|
||||
text = getFirstRelevantTextPart(annotation.textBefore, 'BACKWARD');
|
||||
return text ? (text + annotation.value).trim() : annotation.value;
|
||||
} else {
|
||||
return annotation.value;
|
||||
}
|
||||
if (!annotation.canBeMarkedAsFalsePositive) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (annotation.isRecommendation) {
|
||||
return annotation.value;
|
||||
}
|
||||
|
||||
let text: string;
|
||||
if (annotation.hasTextAfter) {
|
||||
text = getFirstRelevantTextPart(annotation.textAfter, 'FORWARD');
|
||||
return text ? (annotation.value + text).trim() : annotation.value;
|
||||
}
|
||||
|
||||
if (annotation.hasTextBefore) {
|
||||
text = getFirstRelevantTextPart(annotation.textBefore, 'BACKWARD');
|
||||
return text ? (text + annotation.value).trim() : annotation.value;
|
||||
}
|
||||
|
||||
return annotation.value;
|
||||
}
|
||||
|
||||
private _convertPath(path: string): string {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user