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

string in import statement is not escaped like regular strings #172

Closed
sparkprime opened this issue May 2, 2016 · 2 comments
Closed

string in import statement is not escaped like regular strings #172

sparkprime opened this issue May 2, 2016 · 2 comments

Comments

@sparkprime
Copy link
Contributor

The spec is a bit vague on import, but the BNF clearly says it's a regular string, so it should process escape chars in the same way.

This change could cause grief for people on windows doing import "c:\blah.jsonnet".

On the other hand, the ability to import unicode files with \uXXXX codepoints may be useful.

There is another difference that also does not appear in the spec: You cannot use ||| text blocks in import statements. Either relax that restriction or update the spec.

@benley
Copy link
Contributor

benley commented Aug 10, 2017

If you can use @"verbatim strings" for import statements, that would take care of windows path backslashes pretty easily.

sparkprime added a commit to sparkprime/jsonnet that referenced this issue Aug 14, 2017
sparkprime added a commit to sparkprime/jsonnet that referenced this issue Aug 14, 2017
@sparkprime
Copy link
Contributor Author

We also have a test for @"something\something" now. When I do the next release, I'll mention in the release notes that @ is now suggested for Windows paths.

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

No branches or pull requests

2 participants