forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user