Skip to content

Commit

Permalink
test: adjust markdown test to current behavior
Browse files Browse the repository at this point in the history
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
1 parent a8068f3 commit de40ce7
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit de40ce7

Please sign in to comment.