Apply suggestions from code review

This commit is contained in:
Stuart Mumford 2021-06-25 15:44:15 +01:00 committed by GitHub
parent 9194b87bdc
commit 7fab2925b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -534,7 +534,7 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r
formattedBody_.replace(matchImgUri, "\\1 src=\"image://mxcImage/\\2\"\\3");
// Same regex but for single quotes around the src
const static QRegularExpression matchImgUri2(
"(<img [^>]*)src=\'mxc://([^\']*)\'([^>]*>)");
"(<img [^>]*)src=\'mxc://([^\']*)\'([^>]*>)");
formattedBody_.replace(matchImgUri2, "\\1 src=\"image://mxcImage/\\2\"\\3");
const static QRegularExpression matchEmoticonHeight(
"(<img data-mx-emoticon [^>]*)height=\"([^\"]*)\"([^>]*>)");