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