Bug 444422 - Markdown header highlighting last letter colored differently
Summary: Markdown header highlighting last letter colored differently
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (show other bugs)
Version: 5.88.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-26 11:01 UTC by t-ask
Modified: 2021-12-03 20:03 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Last letter in markdown headers colored differently. (26.04 KB, image/png)
2021-10-26 11:01 UTC, t-ask
Details

Note You need to log in before you can comment on or make changes to this bug.
Description t-ask 2021-10-26 11:01:00 UTC
Created attachment 142904 [details]
Last letter in markdown headers colored differently.

SUMMARY

Suddenly, markdown header highlighting colors the last letter in a row differently. Please see attachment.


SOFTWARE/OS VERSIONS

Operating System: Arch Linux
KDE Plasma Version: 5.23.1
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.14.13-208-tkg-pds (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 3800X 8-Core Processor
Memory: 47.0 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1070/PCIe/SSE2
Comment 1 Bolo Cholo 2021-10-31 16:56:12 UTC
Same thing happens to me. 

To be more precise, the last character on Markdown headers H1 to H5 adopts the Highlighting Text Style of Markdown header H6.

Sadly I didn't took note when this started, but it was after one of the recent system upgrades, maybe a month or so ago.

Kate version: 21.08.2
Operating System: Manjaro Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.4.150-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i3-2120 CPU @ 3.30GHz
Memory: 7,7 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 2000
Comment 2 Jan Paul Batrina 2021-11-22 12:59:32 UTC
Confirmed. This is caused by the hacky method used in https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/251 to fix folding of subheaders. I have a partial fix, but it still uses the same hacky method so I'll try looking first if there are cleaner solutions that won't require too much work.
Comment 3 Bug Janitor Service 2021-11-28 12:11:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/277
Comment 4 Christoph Cullmann 2021-12-03 20:03:13 UTC
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 445918

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