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 literal cannot produce a single backslash \ #1067

Open
darinspivey opened this issue Oct 10, 2024 · 0 comments
Open

String literal cannot produce a single backslash \ #1067

darinspivey opened this issue Oct 10, 2024 · 0 comments
Labels
vrl: compiler Changes to the compiler

Comments

@darinspivey
Copy link

Problem

According to the documentation, a string literal of s'\\' should produce a single backslash, given that you have to escape backslash as a special character. The result of this should be "\\". Something seems off in the lexer where the escaped backslash is being literally interpreted, and the output becomes "\\\\".

Example

.nope = s'\\' --> "\\\\"

Version

Tested on the latest version as of this writing, version = "0.19.0"

@jszwedko jszwedko added the vrl: compiler Changes to the compiler label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vrl: compiler Changes to the compiler
Projects
None yet
Development

No branches or pull requests

2 participants