Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/api/parsers/markdown/markdownToHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function trySoftBreak(
i: number
): { html: string; end: number } | null {
if (text[i] === "\n") {
return { html: "\n", end: i + 1 };
return { html: "<br>\n", end: i + 1 };
}
return null;
}
Expand Down
25 changes: 17 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"content": [
{
"styles": {},
"text": "This is a quote that continues here and here too",
"text": "This is a quote
that continues here
and here too",
"type": "text",
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"content": [
{
"styles": {},
"text": "Line one Line two Line three",
"text": "Line one
Line two
Line three",
"type": "text",
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
{
"children": [],
"content": [
{
"styles": {},
"text": "Line one
Line two
Line three",
"type": "text",
},
],
"id": "1",
"props": {
"backgroundColor": "default",
"textAlignment": "left",
"textColor": "default",
},
"type": "paragraph",
},
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"content": [
{
"styles": {},
"text": "aaa bbb",
"text": "aaa
bbb",
"type": "text",
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"children": [],
"content": [
{
"styles": {},
"text": "Line 1
Line 2
Line 3
Line 4",
"type": "text",
},
],
"id": "1",
"props": {
"backgroundColor": "default",
"textAlignment": "left",
"textColor": "default",
},
"type": "paragraph",
},
]
Original file line number Diff line number Diff line change
Expand Up @@ -1689,12 +1689,13 @@ Third paragraph`,
},
executeTest: testParseMarkdown,
},
// Paragraph continuation (lines without blank line)
// Line breaks
{
testCase: {
name: "paragraphContinuation",
Comment thread
matthewlipski marked this conversation as resolved.
name: "lineBreaks",
content: `Line one
still same paragraph`,
Line two
Line three`,
},
executeTest: testParseMarkdown,
},
Expand Down
Loading