Skip to content

Commit

Permalink
Merge pull request #89 from leonardstruck/main
Browse files Browse the repository at this point in the history
Fix: Ensure Proper Spacing for Line Breaks within Paragraphs
  • Loading branch information
christiaanderidder authored Oct 31, 2024
2 parents 7295674 + a433b99 commit 550f3a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/QuestPDF.Markdown/MarkdownRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ private void ProcessLeafInline(LeafInline inline, TextDescriptor text)
break;
case LineBreakInline lineBreak:
// Only add a line break within a paragraph if trailing spaces or a backslash are used.
if(lineBreak.IsBackslash || lineBreak.IsHard) text.Span("\n");
if (lineBreak.IsBackslash || lineBreak.IsHard) text.Span("\n");
else text.Span(" ");
break;
case TaskList task:
text.Span(task.Checked ? _options.TaskListCheckedGlyph : _options.TaskListUncheckedGlyph)
Expand Down
Binary file modified tests/QuestPDF.Markdown.Tests/test.pdf
Binary file not shown.

0 comments on commit 550f3a3

Please sign in to comment.