Fix#4275
I did not consider that replacing one substring with another will point
to shifting position of next URL found with regexp. That's the behavior
of Qt's "QRegularExpression" class - it takes a string into constructor
and seems to make its copy inside so changing source string does not
affect this regex object
Fix#4242
Just running in a loop through all of markdown symbols in found URL's,
replacing them with their associated HTML character code before the code
formatting to avoid any chance of interception
Brief list of changes:
- names of some variables and constants were replaced for reading
convenience;
- URL-highlighting method moved to TextFormatter so URL's don't
conflict with italic text formatting;
- as I understand, in previous version 'file://' URL does not work
because of bad regex. I fix this with help of wiki page that
referenced in comment for old code. Important note: there are two
equal 'file://' URL syntax: 'file:///...' and 'file://localhost/...'
and the second one does NOT work in KDE but works in Gnome so that's
not a bug
Fix#4233
Added class provides text font formatting with HTML font tags
Supported stuff:
- nested formatting;
- several text pieces formatted with the same formatting style at the
one message;
- styling applies only if non-whitespace symbol follows opening
formatting symbol and also non-whitespace symbol preceds closing
symbol;
- only multiline code font formatting supports new line inside of
message text.
Also fix#3804