RED-8812: bold only the selected value, not the entire context.
This commit is contained in:
parent
f0ce6aadb1
commit
55f62e7197
@ -23,17 +23,16 @@
|
||||
<ul *cdkVirtualFor="let text of redactedTexts; let idx = index">
|
||||
<li
|
||||
[innerHTML]="
|
||||
(isFalsePositive
|
||||
((isFalsePositive
|
||||
? 'remove-redaction.dialog.content.list-item-false-positive'
|
||||
: 'remove-redaction.dialog.content.list-item'
|
||||
)
|
||||
| translate
|
||||
: {
|
||||
text: text,
|
||||
type: data.redactions[idx].typeLabel,
|
||||
context: data.falsePositiveContext[idx]
|
||||
type: data.redactions[idx].typeLabel
|
||||
}
|
||||
| replaceNbsp
|
||||
| replaceNbsp) + (isFalsePositive ? data.falsePositiveContext[idx] : '')
|
||||
"
|
||||
></li>
|
||||
</ul>
|
||||
@ -43,7 +42,7 @@
|
||||
<ng-template #singleSelected>
|
||||
<span
|
||||
[innerHTML]="
|
||||
(recommendation
|
||||
((recommendation
|
||||
? 'remove-redaction.dialog.content.list-item-false-recommendation'
|
||||
: isFalsePositive
|
||||
? 'remove-redaction.dialog.content.list-item-false-positive'
|
||||
@ -52,10 +51,9 @@
|
||||
| translate
|
||||
: {
|
||||
text: redactedTexts[0],
|
||||
type: data.redactions[0].typeLabel,
|
||||
context: data.falsePositiveContext[0]
|
||||
type: data.redactions[0].typeLabel
|
||||
}
|
||||
| replaceNbsp
|
||||
| replaceNbsp) + (isFalsePositive ? data.falsePositiveContext[0] : '')
|
||||
"
|
||||
></span>
|
||||
</ng-template>
|
||||
|
||||
@ -354,15 +354,15 @@ export class AnnotationActionsService {
|
||||
let text: string;
|
||||
if (annotation.hasTextAfter) {
|
||||
text = getFirstRelevantTextPart(annotation.textAfter, 'FORWARD');
|
||||
return text ? (annotation.value + text).trim() : annotation.value;
|
||||
return text ? (`<b>${annotation.value}</b>` + text).trim() : `<b>${annotation.value}</b>`;
|
||||
}
|
||||
|
||||
if (annotation.hasTextBefore) {
|
||||
text = getFirstRelevantTextPart(annotation.textBefore, 'BACKWARD');
|
||||
return text ? (text + annotation.value).trim() : annotation.value;
|
||||
return text ? (text + `<b>${annotation.value}</b>`).trim() : `<b>${annotation.value}</b>`;
|
||||
}
|
||||
|
||||
return annotation.value;
|
||||
return `<b>${annotation.value}</b>`;
|
||||
}
|
||||
|
||||
async #extractTextAndPositions(annotationId: string) {
|
||||
|
||||
@ -2047,7 +2047,7 @@
|
||||
"comment": "Comment",
|
||||
"comment-placeholder": "Add remarks or mentions...",
|
||||
"list-item": "<b>{text}</b>",
|
||||
"list-item-false-positive": "<b>{text}</b> as <i>{type}</i> in the context: <b>{context}</b>",
|
||||
"list-item-false-positive": "<b>{text}</b> as <i>{type}</i> in the context: ",
|
||||
"list-item-false-recommendation": "<b>{text}</b> as <i>{type}</i>",
|
||||
"options": {
|
||||
"do-not-recommend": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user