Bug 344734 - Incorrect syntax highlighting for css containing brackets
Summary: Incorrect syntax highlighting for css containing brackets
Status: RESOLVED DUPLICATE of bug 335744
Alias: None
Product: kate
Classification: Applications
Component: syntax (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-02 09:37 UTC by joshua
Modified: 2015-03-13 16:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description joshua 2015-03-02 09:37:22 UTC
This CSS:

@media (max-width: 1150px) {
}

Is valid according to The W3C CSS Validation Service. However, kate incorrectly marks it - and the entire rest of the file after it - as containing an error.

This appears to happen, because kate is not capable of handling brackets with spaces in them. For instance, this is not detected as an error: (max-width:1150px) - note that the space has been removed.

To fix: Kate needs to handle whitespace appropriately.

Reproducible: Always

Steps to Reproduce:
1. One a new document, and set the syntax highlighting to treat it as CSS

2. Enter the a line containing brackets with a space, for instance:

@media (max-width: 1150px) {

Actual Results:  
Everything from the closing bracket to the end of the file is now highlighted as as error.

Expected Results:  
It should have accepted it as valid css.

I am using the most recent version of kate available via apt.
kate -v reports this:

Qt: 4.8.6
KDE Development Platform: 4.13.3
Kate: 3.13.3
Comment 1 Martin Walch 2015-03-13 16:05:40 UTC
This looks the same as bug #335744 "Kate/KWrite CSS highlighting problems with media queries". It is fixed in KDE Applications >=4.14.0. The last few comments of that bug report explain how you can get the fix in your current installation.

*** This bug has been marked as a duplicate of bug 335744 ***