Italics, bold and underline support in dialog box(like Discord)
Is your feature request related to a problem? Please describe.
Discord and Github use Markdown, which allows you to go *italics*, **bold**, and ***bold italics***. Additionally, _italics_, __underline__, ___italics underline___. Finally, you can do ***__bold italics underline__*** or **___bold italics underline___**.
italics, bold, bold italics, italics, underline, italics underline, bold italics underline, bold italics underline
Describe the solution you'd like All cases above work, and it functions as close to Discord as possible. Make it work with Evidence as well. It should also optional in the Settings, enabled by default.
Describe alternatives you've considered Allow users to change in config which chars to use for italics/underline, but that might get far too complex and conflict with the color char system.
Additional context

should be fairly (?) simple to alias certain characters to the HTML tags for italic, bold, and underline - the ability to escape them might be more problematic
There's a lot of source code of hundreds of implementations, the hard part is finding something that works with text crawl
I think the trick is to crawl the text using the underlying document rather than crawling using the underlying HTML or plain text. If you work with documents, Qt should take care of the formatting for you and it should "just work". This may be very expensive, but what if you do something like this:
- Take the fully parsed and formatted text and copy it to a new QTextDocument. Don't do anything with control sequences (
\s,\f) for now. - Clear the dialog text.
- Using a QTextCursor, iterate through the document by one character per tick, as usual. You can look ahead by one or two characters as usual if you need to parse a control sequence, so that you can ignore them and not print them (e.g. you are parsing
\and you want to check if the next character is asorf). - For each visible character iterated, create a QTextDocumentFragment containing that one character (using
QTextCursor::selection) and then insert the fragment into the dialog text's QTextDocument usingQTextCursor::insertFragment.