mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-13 19:21:52 +03:00
b9da2255c4
* editor/mock ts Signed-off-by: Kerry Archibald <kerrya@element.io> * test/editor/serialize-test.js -> test/editor/serialize-test.ts Signed-off-by: Kerry Archibald <kerrya@element.io> * fix ts in serialize-test Signed-off-by: Kerry Archibald <kerrya@element.io> * test/editor/range-test.js -> test/editor/range-test.ts Signed-off-by: Kerry Archibald <kerrya@element.io> * test/editor/position-test.js -> test/editor/position-test.ts Signed-off-by: Kerry Archibald <kerrya@element.io> * fix position-test Signed-off-by: Kerry Archibald <kerrya@element.io> * test/editor/operations-test.js -> test/editor/operations-test.ts Signed-off-by: Kerry Archibald <kerrya@element.io> * test/editor/model-test.js -> test/editor/model-test.ts Signed-off-by: Kerry Archibald <kerrya@element.io> * fix ts in model-test Signed-off-by: Kerry Archibald <kerrya@element.io> * test/editor/history-test.js -> test/editor/history-test.ts Signed-off-by: Kerry Archibald <kerrya@element.io> * fix ts in history-test Signed-off-by: Kerry Archibald <kerrya@element.io> * test/editor/diff-test.js -> test/editor/diff-test.ts Signed-off-by: Kerry Archibald <kerrya@element.io> * test/editor/deserialize-test.js -> test/editor/deserialize-test.ts Signed-off-by: Kerry Archibald <kerrya@element.io> * ts in deserialize-test Signed-off-by: Kerry Archibald <kerrya@element.io> * test/editor/caret-test.js -> test/editor/caret-test.ts Signed-off-by: Kerry Archibald <kerrya@element.io> * ts caret-test Signed-off-by: Kerry Archibald <kerrya@element.io>
178 lines
2.8 KiB
Text
178 lines
2.8 KiB
Text
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`editor/deserialize html messages escapes angle brackets 1`] = `
|
|
Array [
|
|
Object {
|
|
"text": "\\\\> \\\\\\\\<del>no formatting here\\\\\\\\</del>",
|
|
"type": "plain",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`editor/deserialize html messages escapes asterisks 1`] = `
|
|
Array [
|
|
Object {
|
|
"text": "\\\\*hello\\\\*",
|
|
"type": "plain",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`editor/deserialize html messages escapes backslashes 1`] = `
|
|
Array [
|
|
Object {
|
|
"text": "C:\\\\\\\\My Documents",
|
|
"type": "plain",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`editor/deserialize html messages escapes backticks in code blocks 1`] = `
|
|
Array [
|
|
Object {
|
|
"text": "\`\`this → \` is a backtick\`\`",
|
|
"type": "plain",
|
|
},
|
|
Object {
|
|
"text": "
|
|
",
|
|
"type": "newline",
|
|
},
|
|
Object {
|
|
"text": "
|
|
",
|
|
"type": "newline",
|
|
},
|
|
Object {
|
|
"text": "\`\`\`\`",
|
|
"type": "plain",
|
|
},
|
|
Object {
|
|
"text": "
|
|
",
|
|
"type": "newline",
|
|
},
|
|
Object {
|
|
"text": "and here are 3 of them:",
|
|
"type": "plain",
|
|
},
|
|
Object {
|
|
"text": "
|
|
",
|
|
"type": "newline",
|
|
},
|
|
Object {
|
|
"text": "\`\`\`",
|
|
"type": "plain",
|
|
},
|
|
Object {
|
|
"text": "
|
|
",
|
|
"type": "newline",
|
|
},
|
|
Object {
|
|
"text": "\`\`\`\`",
|
|
"type": "plain",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`editor/deserialize html messages escapes backticks outside of code blocks 1`] = `
|
|
Array [
|
|
Object {
|
|
"text": "some \\\\\`backticks\\\\\`",
|
|
"type": "plain",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`editor/deserialize html messages escapes square brackets 1`] = `
|
|
Array [
|
|
Object {
|
|
"text": "\\\\[not an actual link\\\\](https://example.org)",
|
|
"type": "plain",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`editor/deserialize html messages escapes underscores 1`] = `
|
|
Array [
|
|
Object {
|
|
"text": "\\\\_\\\\_emphasis\\\\_\\\\_",
|
|
"type": "plain",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`editor/deserialize html messages preserves nested formatting 1`] = `
|
|
Array [
|
|
Object {
|
|
"text": "a<sub>b_c**d<u>e</u>**_</sub>",
|
|
"type": "plain",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`editor/deserialize html messages preserves nested quotes 1`] = `
|
|
Array [
|
|
Object {
|
|
"text": "> foo",
|
|
"type": "plain",
|
|
},
|
|
Object {
|
|
"text": "
|
|
",
|
|
"type": "newline",
|
|
},
|
|
Object {
|
|
"text": "> ",
|
|
"type": "plain",
|
|
},
|
|
Object {
|
|
"text": "
|
|
",
|
|
"type": "newline",
|
|
},
|
|
Object {
|
|
"text": "> > bar",
|
|
"type": "plain",
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`editor/deserialize html messages surrounds lists with newlines 1`] = `
|
|
Array [
|
|
Object {
|
|
"text": "foo",
|
|
"type": "plain",
|
|
},
|
|
Object {
|
|
"text": "
|
|
",
|
|
"type": "newline",
|
|
},
|
|
Object {
|
|
"text": "
|
|
",
|
|
"type": "newline",
|
|
},
|
|
Object {
|
|
"text": "- bar",
|
|
"type": "plain",
|
|
},
|
|
Object {
|
|
"text": "
|
|
",
|
|
"type": "newline",
|
|
},
|
|
Object {
|
|
"text": "
|
|
",
|
|
"type": "newline",
|
|
},
|
|
Object {
|
|
"text": "baz",
|
|
"type": "plain",
|
|
},
|
|
]
|
|
`;
|