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 Oct 1, 2024
1 parent afb56f1 commit 398caea
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

1 comment on commit 398caea

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.