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

@raw_str backslash inconsistency #24417

Closed
Petr-Hlavenka opened this issue Oct 31, 2017 · 2 comments
Closed

@raw_str backslash inconsistency #24417

Petr-Hlavenka opened this issue Oct 31, 2017 · 2 comments

Comments

@Petr-Hlavenka
Copy link
Contributor

On julia 0.6.0, win64 binary build:
The parsing of \ inside of @raw_str macro is not 100%. the REPL + parser canot deal correctly with backslash at the end of string literal. Actually it interprets this as escaping the " indicating the end of string literal. Example from jupyter (becuse on repl \" is incomplete and cannot be entered).

> raw"\\"
"\\\\"
> raw"\"
syntax: incomplete: invalid string syntax

Stacktrace:
 [1] include_string(::String, ::String) at .\loading.jl:515

I understand this is not solvable inside the raw"" macro. On the other hand, I find the macro extremely useful on windows for dealing with the path to files (especially long paths...) . I know it is a fault of windows, but we (windows users) must live with it.
If there is no better way to solve it, I'll do PR into the doc so it is an expected behavior.

@fredrikekre
Copy link
Member

#22926

@Petr-Hlavenka
Copy link
Contributor Author

Ok, didn't know it's a hot topics right now. Definitely worth solving for 1.0. Closing in favor of #22926.

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