Skip to content

Commit

Permalink
fix regex to correctly handle strings like $$$qgis_version
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Jan 10, 2017
1 parent c5b3b1a commit bcb69c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/qgshelp.cpp
Expand Up @@ -55,9 +55,10 @@ QUrl QgsHelp::helpUrl( const QString& key )
fullPath = path;
Q_FOREACH ( const QString& var, scope->variableNames() )
{
QRegularExpression rx( QStringLiteral( "(?<!\\$)\\$%1" ).arg( var ) );
QRegularExpression rx( QStringLiteral( "(<!\\$\\$)*(\\$%1)" ).arg( var ) );
fullPath.replace( rx, scope->variable( var ).toString() );
}
fullPath.replace( QRegularExpression( "(\\$\\$)" ), "$" );

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

Expand Down

0 comments on commit bcb69c5

Please sign in to comment.