Skip to content

Commit bcb69c5

Browse files
committedJan 10, 2017
fix regex to correctly handle strings like $$$qgis_version
1 parent c5b3b1a commit bcb69c5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/gui/qgshelp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ QUrl QgsHelp::helpUrl( const QString& key )
5555
fullPath = path;
5656
Q_FOREACH ( const QString& var, scope->variableNames() )
5757
{
58-
QRegularExpression rx( QStringLiteral( "(?<!\\$)\\$%1" ).arg( var ) );
58+
QRegularExpression rx( QStringLiteral( "(<!\\$\\$)*(\\$%1)" ).arg( var ) );
5959
fullPath.replace( rx, scope->variable( var ).toString() );
6060
}
61+
fullPath.replace( QRegularExpression( "(\\$\\$)" ), "$" );
6162

6263
helpPath = QStringLiteral( "%1/%2" ).arg( fullPath ).arg( key );
6364

0 commit comments

Comments
 (0)
Please sign in to comment.