Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Golang run-on string when backticks appear to be escaped #614

Open
coreyog opened this issue Mar 4, 2020 · 0 comments
Open

Golang run-on string when backticks appear to be escaped #614

coreyog opened this issue Mar 4, 2020 · 0 comments

Comments

@coreyog
Copy link

coreyog commented Mar 4, 2020

Originally posted on MetaSO.

I came across this answer's code snippet. In Golang, strings enclosed in backticks are taken as a raw string. It doesn't parse for escape sequences. The code formatter erroneously colors the rest of the code as if it were in a multi-line string literal.

This is true even if you explicitly specify the language as golang. Java's formatter gets it right. Java doesn't use backtick strings so it's not a fair comparison.

snippet

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant