Skip to content

Commit

Permalink
Fix multiline handling of expressions within QML / HTML editor widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Sep 29, 2024
1 parent 2fbcbfa commit fbc6354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/attributeformmodelbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ void AttributeFormModelBase::updateAttributeValue( QStandardItem *item )
{
QString code = mEditorWidgetCodes[item];

QRegularExpression re( "expression\\.evaluate\\(\\s*\\\"(.*?[^\\\\])\\\"\\s*\\)" );
QRegularExpression re( R"re(expression\.evaluate\s*\(\s*"(.*?[^\\])"\))re", QRegularExpression::PatternOption::MultilineOption | QRegularExpression::PatternOption::DotMatchesEverythingOption );
QRegularExpressionMatch match = re.match( code );
while ( match.hasMatch() )
{
Expand Down

0 comments on commit fbc6354

Please sign in to comment.