Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tests/markdown.spec.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tests/markdown.spec.js b/src/tests/markdown.spec.js
index 2ae3cb4be..f71dde3b0 100644
--- a/src/tests/markdown.spec.js
+++ b/src/tests/markdown.spec.js
@@ -193,6 +193,11 @@ describe('Markdown serializer from html', () => {
)).toBe(`::: warn\n!warning!\n\n:::`)
})
+ test('table cell escaping', () => {
+ // while '|' has no special meaning in commonmark is has to be escaped for GFM tables
+ expect(markdownThroughEditorHtml('<table><tr><th>greetings</th></tr><tr><td>hello | hallo</td></tr></table>')).toBe('| greetings |\n|-----------|\n| hello \\| hallo |\n')
+ })
+
test('front matter', () => {
expect(markdownThroughEditorHtml('<pre id="frontmatter"><code>some: value</code></pre><h1>Heading</h1>')).toBe('---\nsome: value\n---\n\n# Heading')
// Test --- within front matter is allowed