Skip to content
Permalink
Browse files

fix regex to correctly handle strings like $$$qgis_version

  • Loading branch information
alexbruy committed Jan 10, 2017
1 parent c5b3b1a commit bcb69c5f34c2561a64b081fd7103f017e116e8a0
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gui/qgshelp.cpp
@@ -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 );

0 comments on commit bcb69c5

Please sign in to comment.
You can’t perform that action at this time.