Bug 495411

Summary: Some markdown in headings resets font size to normal text
Product: [Frameworks and Libraries] markdownpart Reporter: 0BADC0DE <vincenzo.romano>
Component: generalAssignee: Friedrich W. H. Kossebau <kossebau>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: markdownpart integrated into kate

Description 0BADC0DE 2024-10-27 06:44:20 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY
Some markdown in headings resets font size to normal text.

STEPS TO REPRODUCE
1.  Define a title like this: "# Normal `mono` **bold**" normal

OBSERVED RESULT
The word "Normal" uses the expected font size. Any subsequent word is rendered with normal text font size, despite being part of a heading.

EXPECTED RESULT
All text within the heading uses the same font size for that heading level.

SOFTWARE/OS VERSIONS
Kernel Version : 6.11.5.zen1-1
Plasma Version : 6.2.2-1
KDE Version : 24.08.2-1
Frameworks Version : 6.7.0-1
Qt5 Version : 5.15.15+kde+r132-1
Qt6 Version : 6.8.0-1
Wayland Version : 1.23.1-1
Plasma/Wayland Protocols Version : 1.14.0-1
XOrg/Wayland Version : 24.1.3-1
Mesa Version : 1:24.2.5-1

ADDITIONAL INFORMATION
Comment 1 0BADC0DE 2024-10-27 07:05:50 UTC
Created attachment 175265 [details]
markdownpart integrated into kate
Comment 2 Friedrich W. H. Kossebau 2024-10-28 12:18:45 UTC
Thanks for the report.  The markdownpart itself though does not do any related processing, instead completely relies on Qt's QTextDocument::setMarkdown() method to do the formatting.  See also MarkdownPart::openFile() implementation at
https://invent.kde.org/utilities/markdownpart/-/blob/master/src/markdownpart.cpp?ref_type=heads#L112

So this bug report needs to be filed upstream against Qt, please.
Comment 3 0BADC0DE 2024-10-28 13:41:01 UTC
Why the status is "RESOLVED UPSTREAM"? Is has not been solved at all yet!
Comment 4 Friedrich W. H. Kossebau 2024-10-28 13:49:17 UTC
(In reply to 0BADC0DE from comment #3)
> Why the status is "RESOLVED UPSTREAM"? Is has not been solved at all yet!

That is an unlucky display of the status, there should be a "," in the middle. The status relative to the product here is "resolved", with an indication this is an "upstream" issue.