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

(properties) Incorrect handling of trailing escaped backslash #2922

Closed
Hirse opened this issue Dec 16, 2020 · 1 comment · Fixed by #2932
Closed

(properties) Incorrect handling of trailing escaped backslash #2922

Hirse opened this issue Dec 16, 2020 · 1 comment · Fixed by #2932
Labels
bug help welcome Could use help from community language

Comments

@Hirse
Copy link
Contributor

Hirse commented Dec 16, 2020

Describe the issue
Properties files support multi-line values by using a \ to escape the newline. This works correctly for most cases, but breaks when the last character is an escaped \ (i.e. \\), which might be the case in a Windows path (folder-path = C:\\some\\path\\)

image

Which language seems to have the issue?
properties

Are you using highlight or highlightAuto?
highlight

Sample Code to Reproduce

a = a1\
    a2
b = b\\
c = c

Expected behavior
image

@Hirse Hirse added bug help welcome Could use help from community language labels Dec 16, 2020
@joshgoebel
Copy link
Member

Thanks, I feel like we've fixed something like this in other grammars... probably just a matter of adding a separate rule to silently eat \\ so it's not counted by the \ before the end of line rule?

Haven't looked just guessing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help welcome Could use help from community language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants