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