Skip to content

Commit a236d86

Browse files
committed
test(plaintext) add regression test for newlines
Signed-off-by: Max <max@nextcloud.com>
1 parent c9f58f6 commit a236d86

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/tests/plaintext.spec.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,17 @@ describe('html as plain text', () => {
7979
expect(plaintextThroughEditor('"\';&.-#><')).toBe('"\';&.-#><')
8080
expect(plaintextThroughEditor(xssFuzzVectors)).toBe(xssFuzzVectors)
8181
})
82+
} )
83+
84+
describe('regression tests', () => {
85+
test('tripple enter creates new lines at end (#6507)', () => {
86+
const tiptap = createEditor({
87+
enableRichEditing: false
88+
})
89+
tiptap.commands.enter()
90+
tiptap.commands.enter()
91+
tiptap.commands.enter()
92+
expect(serializePlainText(tiptap))
93+
.toEqual("\n\n\n")
94+
})
8295
})

0 commit comments

Comments
 (0)