Add missing brackets to if statement body

This commit is contained in:
Bart De Vries 2021-05-12 13:53:22 +02:00
parent 9cab7e605c
commit 0fc8cca3ef

View File

@ -175,9 +175,10 @@ QString Entry::adjustedContent(int width, int fontSize)
QString widthParameter = match.captured(4);
if (widthParameter.length() != 0) {
if (widthParameter.toInt() > width)
if (widthParameter.toInt() > width) {
imgTag.replace(match.captured(3), QStringLiteral("width=\"%1\"").arg(width));
imgTag.replace(QRegularExpression(QStringLiteral("height=\"([0-9]+)(px)?\"")), QString());
}
} else {
imgTag.insert(4, QStringLiteral(" width=\"%1\"").arg(width));
}