From a27ede88a3a9063a3a2265b668b1c41b589852f5 Mon Sep 17 00:00:00 2001 From: Roland Ruckerbauer Date: Sat, 30 May 2020 14:09:10 +0200 Subject: Fix problem with format string tokenization Fixed by just not handling closing curlybrace escaping. --- crates/ra_syntax/src/ast/tokens.rs | 5 ----- 1 file changed, 5 deletions(-) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/ast/tokens.rs b/crates/ra_syntax/src/ast/tokens.rs index 3cd6d99c3..04b0a4480 100644 --- a/crates/ra_syntax/src/ast/tokens.rs +++ b/crates/ra_syntax/src/ast/tokens.rs @@ -418,14 +418,9 @@ pub trait HasFormatSpecifier: AstToken { let mut cloned = chars.clone().take(2); let first = cloned.next().and_then(|next| next.1.as_ref().ok()).copied(); - let second = cloned.next().and_then(|next| next.1.as_ref().ok()).copied(); if first != Some('}') { continue; } - if second == Some('}') { - // Escaped format end specifier, `}}` - continue; - } skip_char_and_emit(&mut chars, FormatSpecifier::Close, &mut callback); } _ => { -- cgit v1.2.3