diff --git a/src/utils/colour.ts b/src/utils/colour.ts index 518b11f835..8262718a39 100644 --- a/src/utils/colour.ts +++ b/src/utils/colour.ts @@ -27,13 +27,13 @@ export function textToHtmlRainbow(str: string): string { const [a, b] = generateAB(i * frequency, 1); const [red, green, blue] = labToRGB(75, a, b); return ( - '' + c + - "" + "" ); }) .join(""); diff --git a/test/__snapshots__/SlashCommands-test.tsx.snap b/test/__snapshots__/SlashCommands-test.tsx.snap index 08d3bdcc47..fdffb74ac3 100644 --- a/test/__snapshots__/SlashCommands-test.tsx.snap +++ b/test/__snapshots__/SlashCommands-test.tsx.snap @@ -18,7 +18,7 @@ exports[`SlashCommands /rainbow should make things rainbowy 1`] = ` { "body": "this is a test message", "format": "org.matrix.custom.html", - "formatted_body": "this is a test message", + "formatted_body": "this is a test message", "msgtype": "m.text", } `; @@ -27,7 +27,7 @@ exports[`SlashCommands /rainbowme should make things rainbowy 1`] = ` { "body": "this is a test message", "format": "org.matrix.custom.html", - "formatted_body": "this is a test message", + "formatted_body": "this is a test message", "msgtype": "m.emote", } `; diff --git a/test/utils/colour-test.ts b/test/utils/colour-test.ts index 02a559447a..2e533d0aa9 100644 --- a/test/utils/colour-test.ts +++ b/test/utils/colour-test.ts @@ -18,7 +18,7 @@ import { textToHtmlRainbow } from "../../src/utils/colour"; describe("textToHtmlRainbow", () => { it("correctly transform text to html without splitting the emoji in two", () => { - expect(textToHtmlRainbow("🐻")).toBe('🐻'); - expect(textToHtmlRainbow("🐕‍🦺")).toBe('🐕‍🦺'); + expect(textToHtmlRainbow("🐻")).toBe('🐻'); + expect(textToHtmlRainbow("🐕‍🦺")).toBe('🐕‍🦺'); }); });