element-web-Github/test/editor/__snapshots__/deserialize-test.ts.snap

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

179 lines
2.5 KiB
Plaintext
Raw Normal View History

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`editor/deserialize html messages escapes angle brackets 1`] = `
2022-11-04 18:48:08 +08:00
[
{
"text": "\\> \\\\<del>no formatting here\\\\</del>",
"type": "plain",
},
]
`;
exports[`editor/deserialize html messages escapes asterisks 1`] = `
2022-11-04 18:48:08 +08:00
[
{
"text": "\\*hello\\*",
"type": "plain",
},
]
`;
exports[`editor/deserialize html messages escapes backslashes 1`] = `
2022-11-04 18:48:08 +08:00
[
{
"text": "C:\\\\My Documents",
"type": "plain",
},
]
`;
exports[`editor/deserialize html messages escapes backticks in code blocks 1`] = `
2022-11-04 18:48:08 +08:00
[
{
"text": "\`\`this → \` is a backtick\`\`",
"type": "plain",
},
2022-11-04 18:48:08 +08:00
{
"text": "
",
"type": "newline",
},
2022-11-04 18:48:08 +08:00
{
"text": "
",
"type": "newline",
},
2022-11-04 18:48:08 +08:00
{
"text": "\`\`\`\`",
"type": "plain",
},
2022-11-04 18:48:08 +08:00
{
"text": "
",
"type": "newline",
},
2022-11-04 18:48:08 +08:00
{
"text": "and here are 3 of them:",
"type": "plain",
},
2022-11-04 18:48:08 +08:00
{
"text": "
",
"type": "newline",
},
2022-11-04 18:48:08 +08:00
{
"text": "\`\`\`",
"type": "plain",
},
2022-11-04 18:48:08 +08:00
{
"text": "
",
"type": "newline",
},
2022-11-04 18:48:08 +08:00
{
"text": "\`\`\`\`",
"type": "plain",
},
]
`;
exports[`editor/deserialize html messages escapes backticks outside of code blocks 1`] = `
2022-11-04 18:48:08 +08:00
[
{
"text": "some \\\`backticks\\\`",
"type": "plain",
},
]
`;
exports[`editor/deserialize html messages escapes square brackets 1`] = `
2022-11-04 18:48:08 +08:00
[
{
"text": "\\[not an actual link\\](https://example.org)",
"type": "plain",
},
]
`;
exports[`editor/deserialize html messages escapes underscores 1`] = `
2022-11-04 18:48:08 +08:00
[
{
"text": "\\_\\_emphasis\\_\\_",
"type": "plain",
},
]
`;
exports[`editor/deserialize html messages preserves nested formatting 1`] = `
2022-11-04 18:48:08 +08:00
[
{
"text": "a<sub>b_c**d<u>e</u>**_</sub>",
"type": "plain",
},
]
`;
exports[`editor/deserialize html messages preserves nested quotes 1`] = `
2022-11-04 18:48:08 +08:00
[
{
"text": "> foo",
"type": "plain",
},
2022-11-04 18:48:08 +08:00
{
"text": "
",
"type": "newline",
},
2022-11-04 18:48:08 +08:00
{
"text": "> ",
"type": "plain",
},
2022-11-04 18:48:08 +08:00
{
"text": "
",
"type": "newline",
},
2022-11-04 18:48:08 +08:00
{
"text": "> > bar",
"type": "plain",
},
]
`;
exports[`editor/deserialize html messages surrounds lists with newlines 1`] = `
2022-11-04 18:48:08 +08:00
[
{
"text": "foo",
"type": "plain",
},
2022-11-04 18:48:08 +08:00
{
"text": "
",
"type": "newline",
},
2022-11-04 18:48:08 +08:00
{
"text": "
",
"type": "newline",
},
2022-11-04 18:48:08 +08:00
{
"text": "- bar",
"type": "plain",
},
2022-11-04 18:48:08 +08:00
{
"text": "
",
"type": "newline",
},
2022-11-04 18:48:08 +08:00
{
"text": "
",
"type": "newline",
},
2022-11-04 18:48:08 +08:00
{
"text": "baz",
"type": "plain",
},
]
`;