ok
This commit is contained in:
@@ -46,27 +46,22 @@ export const useTextParsing = (
|
||||
});
|
||||
}
|
||||
|
||||
// Utiliser displayName au lieu de entity_type
|
||||
// Ligne 45 - Ajouter du debug
|
||||
console.log("useTextParsing - mapping:", {
|
||||
text: mapping.text,
|
||||
displayName: mapping.displayName,
|
||||
entity_type: mapping.entity_type,
|
||||
});
|
||||
// Utiliser displayName directement SANS fallback
|
||||
const anonymizedText = mapping.displayName;
|
||||
|
||||
const anonymizedText =
|
||||
mapping.displayName || `[${mapping.entity_type.toUpperCase()}]`;
|
||||
|
||||
segments.push({
|
||||
text: mapping.text,
|
||||
displayText: anonymizedText,
|
||||
start: mapping.start,
|
||||
end: mapping.end,
|
||||
isEntity: true,
|
||||
entityType: mapping.entity_type,
|
||||
entityIndex: mappingIndex,
|
||||
mapping: mapping,
|
||||
});
|
||||
// Ne créer le segment que si displayName existe
|
||||
if (anonymizedText) {
|
||||
segments.push({
|
||||
text: mapping.text,
|
||||
displayText: anonymizedText,
|
||||
start: mapping.start,
|
||||
end: mapping.end,
|
||||
isEntity: true,
|
||||
entityType: mapping.entity_type,
|
||||
entityIndex: mappingIndex,
|
||||
mapping: mapping,
|
||||
});
|
||||
}
|
||||
|
||||
currentIndex = mapping.end; // CORRECTION: utiliser 'end'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user