Skip to content

Treat carriage returns in text as line breaks - #1850

Open
kroplabeskidu wants to merge 1 commit into
foliojs:masterfrom
kroplabeskidu:carriage-return-line-breaks
Open

kroplabeskidu wants to merge 1 commit into
foliojs:masterfrom
kroplabeskidu:carriage-return-line-breaks

Conversation

@kroplabeskidu

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bug fix. Fixes #336

A \r\n line break left the \r in the line, and it was written to the PDF as a character. Wrapped text now treats \r\n and \r like \n, in text, heightOfString and boundsOfString. With lineBreak: false, \r\n is one line break and a lone \r stays as it was.

Checklist:

  • Unit Tests
  • Update CHANGELOG.md
  • Ready to be merged

@kroplabeskidu
kroplabeskidu force-pushed the carriage-return-line-breaks branch from ca8ea96 to 8d6f2e3 Compare November 1, 2026 15:42
@blikblum

blikblum commented Nov 1, 2026

Copy link
Copy Markdown
Member

PLease rebase

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot indentify the line break of "\r\n"

2 participants