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:
parent
665605b2b6
commit
79c50db009
3 changed files with 6 additions and 6 deletions
|
@ -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>');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue