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

Escape newlines when outputting pattern string value in schemas. #20

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

josstn
Copy link

@josstn josstn commented Feb 22, 2024

Otherwise a newline character (\n) in the pattern value would cause invalid typescript code to be generated.

Otherwise a newline character (\n) in the pattern value would cause invalid typescript code to be generated.
@josstn josstn marked this pull request as ready for review February 22, 2024 12:55
Copy link
Member

@mrlubos mrlubos left a comment

Choose a reason for hiding this comment

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

@josstn how come backtick is also escaped? Was that an existing functionality and you've just added a test?

@josstn
Copy link
Author

josstn commented Feb 22, 2024

@josstn how come backtick is also escaped? Was that an existing functionality and you've just added a test?

Yeah, i just added it as a testcase because I was curious if it worked, not really relevant.

@mrlubos mrlubos merged commit 39f86d7 into hey-api:master Feb 22, 2024
4 checks passed
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