Port salvageMarkup() to QRegularExpression.
Remove one redundant QRegExp #include.
With this commit all of KI18n has been ported to QRegularExpression.
ilic | |
dfaure | |
mlaurent | |
aacid |
Frameworks |
Port salvageMarkup() to QRegularExpression.
Remove one redundant QRegExp #include.
With this commit all of KI18n has been ported to QRegularExpression.
make && ctest
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Unittest for this method added in https://commits.kde.org/ki18n/a92305a4c15ac361417eeb7b933682960c7545e1
Please check your change passes the test.
Extend as needed if you noticed other cases that need to be handled.
I tried to figure out what a "tag without content" in salvageMarkup() would be (to extend the unit test), but couldn't figure it out; <br /> or <hr /> came to mind, but I am not that versed with translation stuff in KDE.
Me neither, but the regexp should tell us what it's about, right? ;)
Indeed it seems to me that this is about things like <br/> but also <unknown/> and even <unknown attr1="value1"/>