Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.2
-
None
-
-
f1e60de665 (qt/qtbase/dev) f28570b2b7 (qt/qtbase/6.3) f28570b2b7 (qt/tqtc-qtbase/6.3) 32213f0043 (qt/qtbase/6.2) 32213f0043 (qt/tqtc-qtbase/6.2) fddb3358a3 (qt/tqtc-qtbase/5.15)
Description
The same sequence as in QTBUG-91222 (calling QTextDocument::setMarkdown and then QTextDocument::toHtml) fails on the following Markdown:
List: 1. **Bold** and plain 2. `code` and plain
producing the following HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Sans Semi-Condensed'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:7px; margin-bottom:7px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">List:</p> <ol style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" font-weight:600;" style=" margin-top:7px; margin-bottom:7px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Bold and plain</li> <li style=" font-family:'monospace';" style=" margin-top:7px; margin-bottom:7px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">code and plain</li></ol></body></html>
Apparently, the nested formatting that starts in the beginning of the bullet gets added as the style of the bullet itself, even when it's not the entire bullet formatted; moreover, it leads to redefinition of the `style` attribute which is not even valid HTML. Can be reproduced with both ordered and unordered lists. Quotes (`>`) are unaffected, producing correctly nested span elements inside indented p elements (why those are not blockquote elements is a separate question).
Attachments
Issue Links
- duplicates
-
QTBUG-81099 Font properties should not affect bullets
- Open
-
QTBUG-27839 This issue is not fixed it still exists for QT 4.8.3 - CLONE - QTextList: When mixing entries in a list with different fonts and sizes, this should not effect the bullets
- Closed
-
QTBUG-3583 QTextList: When mixing entries in a list with different fonts and sizes, this should not effect the bullets
- Closed
- relates to
-
QTBUG-111707 markdown writer needs to add more newlines after (some) list items
- Reported
-
QTBUG-5111 QTextEdit bullets are clipped when increasing text size > 36
- Closed
-
QTBUG-99148 Broken html list rendering because <code> element
- Closed
-
QTBUG-111337 Text incorrectly renders bullet list points after a link
- Closed
For Gerrit Dashboard: QTBUG-92445 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
376634,7 | WIP test markdown and html list items with styled fragments | dev | qt/qtbase | Status: NEW | -2 | 0 |
376642,5 | Markdown writer: indent fence consistent with code block | dev | qt/qtbase | Status: MERGED | +2 | 0 |
376785,2 | Markdown writer: indent fence consistent with code block | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
388445,2 | QTextMarkdownImporter: don't apply text char format to list item block | dev | qt/qtbase | Status: MERGED | +2 | 0 |
388881,2 | QTextMarkdownImporter: don't apply text char format to list item block | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
388882,3 | QTextMarkdownImporter: don't apply text char format to list item block | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |
388887,3 | QTextMarkdownImporter: don't apply text char format to list item block | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |