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

Backslash escapes shouldn't be recognized in raw strings #36

Open
tplunket opened this issue Oct 29, 2020 · 0 comments
Open

Backslash escapes shouldn't be recognized in raw strings #36

tplunket opened this issue Oct 29, 2020 · 0 comments
Assignees

Comments

@tplunket
Copy link
Contributor

Triple-quoted strings in Kotlin do not do any escape processing so backslash-character should not be interpreted as an escape sequence.

E.g. my TeamCity config contains lines such as

        scriptContent = """tools\bin\make -C workdir myapp"""

...and the backslash-b is highlighted as if it is valid while backslash-m is highlighted as an error. Neither of these should be highlight.

I believe that the fix is to simply remove the ,ktSpecialChar,ktSpecialCharError bit from the end of the line in syntax/kotlin.vim for ktString start='"""' but I'm not sure if that's entirely correct.

I reference the information about "raw strings" on https://devtut.github.io/kotlin/strings.html#string-literals

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