2025-11-13 10:50:33 +00:00
|
|
|
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
2023-05-18 09:32:14 +01:00
|
|
|
|
2024-07-04 13:48:07 -04:00
|
|
|
exports[`bodyToHtml does not mistake characters in text presentation mode for emoji 1`] = `
|
|
|
|
|
<DocumentFragment>
|
|
|
|
|
<span
|
2024-07-25 18:58:33 +02:00
|
|
|
class="mx_EventTile_body translate"
|
2024-07-04 13:48:07 -04:00
|
|
|
dir="auto"
|
|
|
|
|
>
|
|
|
|
|
↔ ❗︎
|
|
|
|
|
</span>
|
|
|
|
|
</DocumentFragment>
|
|
|
|
|
`;
|
|
|
|
|
|
2023-05-25 09:32:20 +01:00
|
|
|
exports[`bodyToHtml feature_latex_maths should not mangle code blocks 1`] = `"<p>hello</p><pre><code>$\\xi$</code></pre><p>world</p>"`;
|
|
|
|
|
|
2024-04-16 12:53:57 -04:00
|
|
|
exports[`bodyToHtml feature_latex_maths should not mangle divs 1`] = `"<p>hello</p><div>world</div>"`;
|
|
|
|
|
|
2026-04-08 07:40:43 +00:00
|
|
|
exports[`bodyToHtml feature_latex_maths should render block katex 1`] = `"<p>hello</p><span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mi>ξ</mi></mrow><annotation encoding="application/x-tex">\\xi</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.046em;">ξ</span></span></span></span></span><p>world</p>"`;
|
2023-05-25 09:32:20 +01:00
|
|
|
|
2026-04-08 07:40:43 +00:00
|
|
|
exports[`bodyToHtml feature_latex_maths should render inline katex 1`] = `"hello <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ξ</mi></mrow><annotation encoding="application/x-tex">\\xi</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.046em;">ξ</span></span></span></span> world"`;
|
2023-05-25 09:32:20 +01:00
|
|
|
|
2025-03-26 20:25:03 +00:00
|
|
|
exports[`bodyToNode generates big emoji for emoji made of multiple characters 1`] = `
|
2024-07-04 13:48:07 -04:00
|
|
|
<DocumentFragment>
|
|
|
|
|
<span
|
2024-07-25 18:58:33 +02:00
|
|
|
class="mx_EventTile_body mx_EventTile_bigEmoji translate"
|
2024-07-04 13:48:07 -04:00
|
|
|
dir="auto"
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
class="mx_Emoji"
|
|
|
|
|
title=":man-woman-girl-boy:"
|
|
|
|
|
>
|
|
|
|
|
👨👩👧👦
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<span
|
|
|
|
|
class="mx_Emoji"
|
|
|
|
|
title=":left_right_arrow:"
|
|
|
|
|
>
|
|
|
|
|
↔️
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<span
|
|
|
|
|
class="mx_Emoji"
|
|
|
|
|
title=":flag-is:"
|
|
|
|
|
>
|
|
|
|
|
🇮🇸
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</DocumentFragment>
|
|
|
|
|
`;
|
|
|
|
|
|
2025-03-26 20:25:03 +00:00
|
|
|
exports[`bodyToNode should generate big emoji for an emoji-only reply to a message 1`] = `
|
2023-05-18 09:32:14 +01:00
|
|
|
<DocumentFragment>
|
|
|
|
|
<span
|
2024-07-25 18:58:33 +02:00
|
|
|
class="mx_EventTile_body mx_EventTile_bigEmoji translate"
|
2023-05-18 09:32:14 +01:00
|
|
|
dir="auto"
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
class="mx_Emoji"
|
|
|
|
|
title=":smiling_face_with_3_hearts:"
|
|
|
|
|
>
|
|
|
|
|
🥰
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</DocumentFragment>
|
|
|
|
|
`;
|
2025-04-22 10:37:47 +01:00
|
|
|
|
|
|
|
|
exports[`bodyToNode should handle inline media when mediaIsVisible is false 1`] = `
|
|
|
|
|
<DocumentFragment>
|
|
|
|
|
<span
|
|
|
|
|
class="mx_EventTile_body markdown-body translate"
|
|
|
|
|
dir="auto"
|
|
|
|
|
>
|
|
|
|
|
<img />
|
|
|
|
|
foo Hello there
|
|
|
|
|
</span>
|
|
|
|
|
</DocumentFragment>
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`bodyToNode should handle inline media when mediaIsVisible is true 1`] = `
|
|
|
|
|
<DocumentFragment>
|
|
|
|
|
<span
|
|
|
|
|
class="mx_EventTile_body markdown-body translate"
|
|
|
|
|
dir="auto"
|
|
|
|
|
>
|
|
|
|
|
<img
|
|
|
|
|
src="https://example.org/img"
|
|
|
|
|
style="max-width:800px;max-height:600px"
|
|
|
|
|
/>
|
|
|
|
|
foo Hello there
|
|
|
|
|
</span>
|
|
|
|
|
</DocumentFragment>
|
|
|
|
|
`;
|
2026-06-15 13:58:56 +01:00
|
|
|
|
|
|
|
|
exports[`sanitizedHtmlNode should respect className 1`] = `
|
|
|
|
|
<DocumentFragment>
|
|
|
|
|
<div
|
|
|
|
|
class="testClass"
|
|
|
|
|
dir="auto"
|
|
|
|
|
>
|
|
|
|
|
<a
|
|
|
|
|
href="https://google.com"
|
|
|
|
|
rel="noreferrer noopener"
|
|
|
|
|
target="_blank"
|
|
|
|
|
>
|
|
|
|
|
Link
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</DocumentFragment>
|
|
|
|
|
`;
|