Bug 379005 - Kate highlights the word END inside Bash comments
Summary: Kate highlights the word END inside Bash comments
Status: RESOLVED INTENTIONAL
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-20 16:10 UTC by Ganton
Modified: 2018-05-29 21:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Kate incorrectly highlights the word END inside Bash comments (9.01 KB, image/png)
2017-04-20 16:10 UTC, Ganton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ganton 2017-04-20 16:10:40 UTC
Created attachment 105113 [details]
Kate incorrectly highlights the word END inside Bash comments

Hello! At least using Kubuntu 17.04: Kate incorrectly highlights the word END inside Bash comments, I attach a screenshot.

Thanks! Keep up the good work!

Reproducible: Always

Steps to Reproduce:
    1. Use the word "END" inside a comment in a bash script.

Actual Results:
    "END" is highlighted.

Expected Results:
    "END" shouldn't be highlighted.
Comment 1 Dominik Haumann 2018-05-29 21:13:28 UTC
This already improved: Only if END is a word with word boundaries, it is highlighted.

In fact, this is a feature by design, called region markers that define code folding regions:

# BEGIN asdf
...
# END

Here, BEGIN will start a code folding region that is ended with END. This is similar to other conventions such as {{{ ... }}}. So this is not a classical bug, but rather intended.

Therefore, I'll close for now as NOT-A-BUG.

The Kate developers certainly can discuss whether this feature is really valuable - and if not, we can also remove it. But it's not possible to only disable it for Bash, and even if we did, it would not help much, since this is an issue with all highlighting files. The respective rules are in Alert.xml.