diff --git a/crates/biome_graphql_parser/src/lexer/mod.rs b/crates/biome_graphql_parser/src/lexer/mod.rs index 79602f45583d..1c9e782b92a1 100644 --- a/crates/biome_graphql_parser/src/lexer/mod.rs +++ b/crates/biome_graphql_parser/src/lexer/mod.rs @@ -656,16 +656,8 @@ impl<'src> GraphqlLexer<'src> { && self.byte_at(2) == Some(b'"') { self.advance(3); - (state, None) - } else { - let c = self.current_char_unchecked(); - let diagnostic = ParseDiagnostic::new( - "Invalid escape sequence", - escape_start..self.text_position() + c.text_len(), - ) - .with_hint(r#"For block string the only valid escape sequences is `\"""`. "#); - (state, Some(diagnostic)) } + (state, None) } // should never happen _ => ( diff --git a/crates/biome_graphql_parser/src/lexer/tests.rs b/crates/biome_graphql_parser/src/lexer/tests.rs index 8a2585c95fd5..fefd35b09e96 100644 --- a/crates/biome_graphql_parser/src/lexer/tests.rs +++ b/crates/biome_graphql_parser/src/lexer/tests.rs @@ -219,11 +219,10 @@ fn string() { WHITESPACE:1, } - // invalid escape sequence + // unescaped backslash assert_lex! { - r#"""" \" \r \n \"" """ "#, - ERROR_TOKEN:20, - WHITESPACE:1, + r#"""" \" \r \n \"" """"#, + GRAPHQL_STRING_LITERAL:20, } // empty