Skip to content

Improve string escaping for HCL interpolation #224

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

Merged
merged 3 commits into from
May 5, 2025

Conversation

eranor
Copy link
Contributor

@eranor eranor commented Apr 17, 2025

Revised _escape_interpolated_str to handle heredoc strings and added more robust escaping for special characters.

Added tests and a sample HCL file to validate various unicode and complex string scenarios.

Revised `_escape_interpolated_str` to handle heredoc strings and added more robust escaping for special characters. Added tests and a sample HCL file to validate various unicode and complex string scenarios, ensuring accurate handling and output.
@eranor eranor requested a review from a team as a code owner April 17, 2025 01:23
@kkozik-amplify
Copy link
Collaborator

kkozik-amplify commented Apr 18, 2025

Please add test/helpers/terraform-config-json/unicode_strings.json file with JSON equivalent of the terraform test file. (I also believe you can remove the test/unit/test_unicode_strings.py test file whatsoever).
Make sure test suite and pre-commit pass locally. Let me know in case of any issues.
Thank you for contributing!

@kkozik-amplify kkozik-amplify self-assigned this Apr 18, 2025
- Replace `test_unicode_strings.py` with `unicode_strings.json`
@eranor
Copy link
Contributor Author

eranor commented May 5, 2025

@kkozik-amplify I've made the requested changes.

@kkozik-amplify kkozik-amplify merged commit 89ad71c into amplify-education:main May 5, 2025
10 checks passed
kkozik-amplify added a commit that referenced this pull request May 5, 2025
kkozik-amplify added a commit that referenced this pull request May 6, 2025
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