Created attachment 143834 [details] screenshot SUMMARY When editing markdown, headings are highlighted in a way that renders the text unreadable. The whole box around the text is colored (in my theme purple). STEPS TO REPRODUCE 1. open .md file 2. create heading (# heading) 3. look at highlight OBSERVED RESULT everything colored but the last character. See attached Image EXPECTED RESULT highlighted but still readable SOFTWARE/OS VERSIONS Linux/KDE Plasma: 21.08.03 on Arch Linux (available in About System) KDE Plasma Version: 5.23.3 KDE Frameworks Version: 5.88.0 Qt Version: 5.12.2 ADDITIONAL INFORMATION Related https://bugs.kde.org/show_bug.cgi?id=444422
Confirmed with these steps: 1. open/create .md file 2. Insert the following text: # heading ## heading # heading 2 3. Place cursor on "# heading 2" This is (unintentionally) caused by the folding region highlight introduced by https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/194. The fix would be to ensure that the Heading color(s) and the Bracket Highlight Color are not the same, at least for the default color schemes.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/277
Git commit 6188135d40c8f62176c5762896d130cc0c95bd4e by Christoph Cullmann, on behalf of Jan Paul Batrina. Committed on 03/12/2021 at 19:53. Pushed by cullmann into branch 'master'. markdown.xml: Fix highlighting of headers (include last char) d277eb4134a2aab4d5981b605faa85b83ae4f552 introduced a hack to close subheaders by using a header's last char as the closing character for the subheader regions. This made the last character always highlighted as an H6 header (which was not visible with the Breeze themes since all headers had the same color). An invisible sentinel region is now used so that the header regions won't be paired together, preventing erroneous folding region highlights. Related: bug 444422 M +54 -54 autotests/folding/test.markdown.fold M +53 -53 autotests/html/test.markdown.dark.html M +53 -53 autotests/html/test.markdown.html M +53 -53 autotests/reference/test.markdown.ref M +23 -13 data/syntax/markdown.xml https://invent.kde.org/frameworks/syntax-highlighting/commit/6188135d40c8f62176c5762896d130cc0c95bd4e