Repository navigation
fix(project): handle escaped quotes in .strings files - #264
Closed
RaphaelFakhri wants to merge 1 commit into
Closed
RaphaelFakhri wants to merge 1 commit into
RaphaelFakhri wants to merge 1 commit into
Conversation
|
@RaphaelFakhri is attempting to deploy a commit to the Ionic Team on Vercel. A member of the Team first needs to authorize it. |
Collaborator
|
Closed by #265 |
Author
|
Would appreciate some credit in the release notes |
Collaborator
|
Changelog is auto-generated and does not mention any authors directly, see https://github.com/ionic-team/trapeze/edit/main/packages/project/CHANGELOG.md. Your issue is linked. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
.stringsparser ended a quoted key or value at any", including an escaped\". The next character then threwError parsing .strings file: unknown character, soios.stringscouldn't edit files such as anInfoPlist.stringscontaining"Allow \"App\" to use the camera". The parser also read/*and*/inside a quoted string as comment markers.This change:
\"doesn't end the string and the file round-trips unchanged.Testing
Should keep escaped quotes and comment markers inside stringstopackages/project/test/strings-file.test.ts. It parses a file with escaped quotes and comment markers in keys and values and checks that it regenerates unchanged.cd packages/project && npx vitest run test/strings-file.test.ts: 8 passed. With the fix reverted, the new test fails withError parsing .strings file: unknown character at 2:39.npm run typecheck -w packages/projectpasses.Fixes #263