diff --git a/apps/editor/src/__test__/unit/convertor.spec.ts b/apps/editor/src/__test__/unit/convertor.spec.ts index f06413c55e..726fa811ee 100644 --- a/apps/editor/src/__test__/unit/convertor.spec.ts +++ b/apps/editor/src/__test__/unit/convertor.spec.ts @@ -438,7 +438,7 @@ describe('Convertor', () => { assertConverting(markdown, expected); }); - it('
with html inline node ', () => { + it('
with html inline node', () => { const markdown = source` foo bar @@ -452,6 +452,45 @@ describe('Convertor', () => { assertConverting(markdown, expected); }); + + it('
with following
', () => { + const markdown = source` + text1 +
+ text2
+
+ text3 + `; + const expected = source` + text1 + + text2 + + text3 + `; + + assertConverting(markdown, expected); + }); + + it('
in the middle of the paragraph', () => { + const markdown = source` + text1 +
+ te
xt2
+
+ text3 + `; + const expected = source` + text1 + + te + xt2 + + text3 + `; + + assertConverting(markdown, expected); + }); }); describe('convert inline html', () => { diff --git a/apps/editor/src/__test__/unit/editor.spec.ts b/apps/editor/src/__test__/unit/editor.spec.ts index 977a32aaa8..0528b6149c 100644 --- a/apps/editor/src/__test__/unit/editor.spec.ts +++ b/apps/editor/src/__test__/unit/editor.spec.ts @@ -1,5 +1,5 @@ import '@/i18n/en-us'; -import { oneLineTrim, stripIndents } from 'common-tags'; +import { oneLineTrim, stripIndents, source } from 'common-tags'; import { Emitter } from '@t/event'; import { EditorOptions } from '@t/editor'; import type { OpenTagToken } from '@toast-ui/toastmark'; @@ -74,7 +74,7 @@ describe('editor', () => { it('basic', () => { editor.setMarkdown('# heading\n* bullet'); - const result = stripIndents` + const result = oneLineTrim`

heading