Bug 379005

Summary: Kate highlights the word END inside Bash comments
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: Ganton <kubry>
Component: syntaxAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: christoph
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Kate incorrectly highlights the word END inside Bash comments

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.