Fix an extra space being added in the stringInterpolation() function of Target.hpp

This commit is contained in:
Username404 2021-08-28 23:25:16 +02:00
parent 50b84a03f3
commit e92b3cf12f
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ protected:
const bool closingBraceIsNPOS = closingBrace == string::npos; const bool closingBraceIsNPOS = closingBrace == string::npos;
const bool wrongClosingBrace = !closingBraceIsNPOS && ((hasNext && closingBrace > interpolationVector[i + 1])); const bool wrongClosingBrace = !closingBraceIsNPOS && ((hasNext && closingBrace > interpolationVector[i + 1]));
if (closingBraceIsNPOS || wrongClosingBrace) { if (closingBraceIsNPOS || wrongClosingBrace) {
output << view.substr(occurence - 1, (hasNext ? interpolationVector[i + 1] - (occurence - 1) : 0)); output << view.substr(occurence, (hasNext ? interpolationVector[i + 1] - occurence : 0));
} }
output << closeCharacters; output << closeCharacters;
if (not closingBraceIsNPOS && not wrongClosingBrace) { if (not closingBraceIsNPOS && not wrongClosingBrace) {