I'm getting some unexpected results when appending strings with links and line breaks to a QTextBrowser instance.
browser = QTextBrowser()
browser.append('foo <a href="https://example.com">example.com</a> bar')
browser.append('foo\n<a href="https://example.com">example.com</a>')
browser.append('\n<a href="https://example.com">example.com</a>\nbar')
browser.append('\nfoo\nbar')
This will look like this:
The first and last 'appends' are controls and behave as expected. But when line breaks and links are combined in one string, strange things are happening.
For the second 'append' the link is not being 'linkefied', and for the third one, the two line breaks are ignored.
What's happening here?
` instead of `\n`. – ekhumoro Mar 13 '23 at 21:20