Skip to content
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

fix: backslash in tagged template #125

Closed
wants to merge 2 commits into from

Conversation

Jack-Works
Copy link

This PR fixes \n being extracted to \\n.

Copy link
Collaborator

@timofei-iatsenko timofei-iatsenko left a comment

Choose a reason for hiding this comment

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

There two changes in the code, but only one test added. It seems there are cases which is not covered.

The second case might be

<Trans>{`Multiline\nstring`}</Trans>

(please test it with and without fix, because i just took it from mi mind)

src/ast_utils.rs Outdated Show resolved Hide resolved
@Jack-Works
Copy link
Author

Hi @timofei-iatsenko thanks for the review, I have updated the PR and added one case, but I cannot fix that case. I tried 2 to 3 different ways but to fix that case it looks like I need to rewrite a lot.

@Jack-Works
Copy link
Author

looks like the new major version no longer does anything to the strings in tagged templates, closed for now
https://js-lingui-git-next-crowdin.vercel.app/releases/migration-5#no-whitespace-cleaning-in-js-macros

@Jack-Works Jack-Works closed this Dec 19, 2024
@Jack-Works Jack-Works deleted the fix-backslash-n branch December 19, 2024 11:52
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.

2 participants