diff --git a/DMCompiler/Compiler/DMPreprocessor/DMPreprocessorLexer.cs b/DMCompiler/Compiler/DMPreprocessor/DMPreprocessorLexer.cs index bde1ab358b..861626ecee 100644 --- a/DMCompiler/Compiler/DMPreprocessor/DMPreprocessorLexer.cs +++ b/DMCompiler/Compiler/DMPreprocessor/DMPreprocessorLexer.cs @@ -414,8 +414,12 @@ public Token NextToken(bool ignoreWhitespace = false) { } else if (isLong) { // Long strings ignore a newline immediately after the @{" and before the "} + if (TokenTextBuilder[3] == '\r') + TokenTextBuilder.Remove(3, 1); if (TokenTextBuilder[3] == '\n') TokenTextBuilder.Remove(3, 1); + if (TokenTextBuilder[^3] == '\r') + TokenTextBuilder.Remove(TokenTextBuilder.Length - 3, 1); if (TokenTextBuilder[^3] == '\n') TokenTextBuilder.Remove(TokenTextBuilder.Length - 3, 1);