Skip to content

markdown.xml: Fix highlighting of headers (include last char)

Jan Paul Batrina requested to merge work/fix-markdown-header-highlight into master

d277eb41 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.

BUG: 444422 BUG: 445918

This still uses the same hacky approach in the original commit, but now the whole header will be repeatedly matched instead of just the last character (will be slower, but is required to fully highlight the whole header).

Before After
kate-markdown-header-before kate-markdown-header-after
Edited by Jan Paul Batrina

Merge request reports