Skip to content

Commit

Permalink
#2263 fix parsing of line breaks for pasted multiline text
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasBuchfink committed Feb 21, 2024
1 parent 8d05074 commit 4fd1a05
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export const getTextValue = (editor: Accessor<EditorRef>) => {
switch (tiptap_node.type) {
case "text":
if (patterns.at(-1)?.type === "Text") {
if (tiptap_nodes.at(+1).type === "text") {
patterns.at(-1).value += "\n"
}
patterns.at(-1).value += tiptap_node.text
} else {
patterns.push({ type: "Text", value: tiptap_node.text } as Text)
Expand Down

0 comments on commit 4fd1a05

Please sign in to comment.