Skip to content
Prev Previous commit
Next Next commit
test: adjust markdown test to current behavior
Right now we add an empty line after each image so it lives in its own paragraph.

This is not needed at the end of the file
and we should preserve the number of newlines instead (#3428).

But for now it should not block merging the block images pr #3282.

Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud authored and mejo- committed Nov 15, 2022
commit 7f472eba5ee9ceccbc9bce13c8095fd1c624a92a
3 changes: 2 additions & 1 deletion src/tests/markdown.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ describe('Markdown though editor', () => {
expect(markdownThroughEditor('[bar\\\\]: /uri\n\n[bar\\\\]')).toBe('[bar\\\\](/uri)')
})
test('images', () => {
expect(markdownThroughEditor('![test](foo)')).toBe('![test](foo)')
expect(markdownThroughEditor('text ![test](foo) moretext')).toBe('text ![test](foo) moretext')
// regression introduced in #3282. To be fixed in #3428.
expect(markdownThroughEditor('![test](foo)')).toBe('![test](foo)\n\n')
})
test('special characters', () => {
expect(markdownThroughEditor('"\';&.-#><')).toBe('"\';&.-#><')
Expand Down