You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
Use data-mx-color for rainbows (#12325)
* Use data-mx-color for rainbows The font tag may be deprecated soon (https://github.com/matrix-org/matrix-spec/pull/1739) Signed-off-by: Tulir Asokan <tulir@maunium.net> * Update tests Signed-off-by: Tulir Asokan <tulir@maunium.net> --------- Signed-off-by: Tulir Asokan <tulir@maunium.net>
This commit is contained in:
@ -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('<font color="#ff00be">🐻</font>');
|
||||
expect(textToHtmlRainbow("🐕🦺")).toBe('<font color="#ff00be">🐕🦺</font>');
|
||||
expect(textToHtmlRainbow("🐻")).toBe('<span data-mx-color="#ff00be">🐻</span>');
|
||||
expect(textToHtmlRainbow("🐕🦺")).toBe('<span data-mx-color="#ff00be">🐕🦺</span>');
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user