Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.4.1
-
-
41a1ff4e3 (dev)
Description
Consider the following simple QML file:
import QtQuick Text { width: 800 height: 600 textFormat: Text.MarkdownText text: "- Foo\n- [Bar](https://qt.io)\n- Baz\n" }
It basically works, however, the bullet point of the last list entry is incorrectly rendered in blue (i.e. the link color with which the text in the previous list item ended):
Interestingly, using TextEdit does not yield this effect, i.e. the following works:
import QtQuick import QtQuick.Controls TextEdit { width: 800 height: 600 textFormat: TextEdit.MarkdownText text: "- Foo\n- [Bar](https://qt.io)\n- Baz\n" }
By the way, this issue is probably not tied to Markdown format. See also this bug report against my app: https://gitlab.com/rpdev/opentodolist/-/issues/575
In my app, I am currently using another library to convert Markdown to HTML first and then use rich text rendering - which shows the same effect. I am currently working on this and trying to migrate to using Qt's internal Markdown rendering. When I use e.g. QTextDocument to convert Markdown to HTML first and then render it using a label, I also get the strange bullet point rendering, so it seems to be inherently in the rendering code of (read only) rich text.
Attachments
Issue Links
- is duplicated by
-
QTBUG-123855 Inconsistent RichText Formatting of "<ol>" and "<ul>" in Text QML type
- Closed
- relates to
-
QTBUG-111707 markdown writer needs to add more newlines after (some) list items
- Reported
-
QTBUG-92445 Markdown smashes nested formatting inside lists
- Closed
-
QTBUG-2188 QTextDocument: Bullets in bullet lists are not affected by text color
- Closed