Skip to content

fix: enable client parser to retain carriage return characters#902

Merged
remarkablemark merged 6 commits intoremarkablemark:masterfrom
kingflamez:bug/handle-carriage-return
Dec 4, 2024
Merged

fix: enable client parser to retain carriage return characters#902
remarkablemark merged 6 commits intoremarkablemark:masterfrom
kingflamez:bug/handle-carriage-return

Conversation

@kingflamez
Copy link
Copy Markdown
Contributor

@kingflamez kingflamez commented Dec 1, 2024

What is the motivation for this pull request?

Bug fix

What is the current behavior?

Closes #420
Addresses html-react-parser #864

What is the new behavior?

const text = "toto \r\n toto"

parse(text)

old output: "toto toto"
new output: "toto \r\n toto"

Checklist:

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.90%. Comparing base (c4fc01e) to head (67c3826).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #902      +/-   ##
==========================================
+ Coverage   92.59%   92.90%   +0.31%     
==========================================
  Files           7        7              
  Lines         135      141       +6     
  Branches       30       30              
==========================================
+ Hits          125      131       +6     
  Misses          8        8              
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Owner

@remarkablemark remarkablemark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, left 2 comments

@remarkablemark remarkablemark changed the title Fix: enable client parser to retain carriage return characters fix: enable client parser to retain carriage return characters Dec 1, 2024
@kingflamez
Copy link
Copy Markdown
Contributor Author

@remarkablemark added tests

Copy link
Copy Markdown
Owner

@remarkablemark remarkablemark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Carriage return is stripped in client parser

2 participants