mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SyntaxColoring] Check if the end quote is escaped when checking if a string ends. rdar://23188457
This commit is contained in:
@@ -134,7 +134,8 @@ SyntaxModelContext::SyntaxModelContext(SourceFile &SrcFile)
|
||||
if (PrevTok.getKind() != tok::string_literal)
|
||||
continue;
|
||||
StringRef StrText = PrevTok.getText();
|
||||
if (StrText.size() > 1 && StrText.back() == '\"')
|
||||
if (StrText.size() > 1 && StrText.back() == '\"' &&
|
||||
!StrText.endswith("\\\""))
|
||||
continue;
|
||||
Kind = SyntaxNodeKind::StringInterpolationAnchor;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user