CppEditor: Prevent indenting inside all variants of raw string literals

Fixes: QTCREATORBUG-27244
Change-Id: Icda903bf572081278af34078e4f6243747a7b7ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Christian Kandeler
2022-03-28 11:50:52 +02:00
parent 83f6c82752
commit e2391574c8

View File

@@ -825,8 +825,11 @@ bool CodeFormatter::tryExpression(bool alsoExpression)
break;
}
if (m_currentToken.isStringLiteral())
newState = m_currentToken.kind() == T_RAW_STRING_LITERAL ? raw_string_open : string_open;
if (m_currentToken.isStringLiteral()) {
newState = m_currentToken.kind() >= T_FIRST_RAW_STRING_LITERAL
&& m_currentToken.kind() <= T_LAST_RAW_STRING_LITERAL ? raw_string_open
: string_open;
}
if (newState != -1) {
if (alsoExpression)