Skip to content

Carriage return replacement breaking LaTeX #917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
remarkablemark opened this issue Dec 16, 2024 · 0 comments · Fixed by #923 or #924
Closed

Carriage return replacement breaking LaTeX #917

remarkablemark opened this issue Dec 16, 2024 · 0 comments · Fixed by #923 or #924
Assignees
Labels

Comments

@remarkablemark
Copy link
Owner

Expected Behavior

In a text document use of an escaped backslash before an r character should not remove the r character. This is necessary for e.g., LaTeX, where commands like \right) are common.

See remarkablemark/html-react-parser#1634

Actual Behavior

All \r are removed from the HTML string, even if the raw string is formatted as \\r.

Caused by #902

Steps to Reproduce

parse('<span class="math">\\left(\\right)\\rD\\rightarrow\\reals\\ni</span>');

Reproducible Demo

https://stackblitz.com/edit/html-react-parser-typescript-w9j4u9vu?file=src%2Findex.tsx

Environment

  • Version: 5.0.11
  • Platform:
  • Browser:
  • OS:

Keywords

LaTeX, carriage return, escape, unescape, special character

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant