fix: preserve placeholder case when restoring project text
This commit is contained in:
@@ -74,4 +74,16 @@ describe("formatierte Textwiederherstellung", () => {
|
||||
),
|
||||
).toBe("<b>abcMax Mustermannxyz</b>");
|
||||
});
|
||||
|
||||
it("erhält HTML-Formatierung auch bei anders geschriebenen Platzhaltern", () => {
|
||||
const html = "<b>person_01</b> und <i>Person_01</i>";
|
||||
expect(restoreRichHtml(html, "person_01 und Person_01",
|
||||
"max mustermann und Max Mustermann", mapping))
|
||||
.toBe("<b>max mustermann</b> und <i>Max Mustermann</i>");
|
||||
expect(restoreRichHtml("<b>Person_01</b> / <i>PERSON_01</i>",
|
||||
"Person_01 / PERSON_01", "Person_01 / Eins", {
|
||||
PERSON_01: { original: "Eins", type: "PERSON" },
|
||||
person_01: { original: "Zwei", type: "PERSON" },
|
||||
})).toBe("<b>Person_01</b> / <i>Eins</i>");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user