Bug 395079

Summary: mediatype operator "prefers-reduced-motion" will break logical structure of highlighting
Product: [Frameworks and Libraries] frameworks-syntax-highlighting Reporter: Peter Möller <gorgonz>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: christoph
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: example css, showing the wrong highlighting
Screenshot of Editor, showing highlighted css code

Description Peter Möller 2018-06-06 10:07:56 UTC
Created attachment 113110 [details]
example css, showing the wrong highlighting

KATE Version 16.08.2

Maybe, the effect is already gone with newer versions ;-)

If You use mediatype blocks, that have an operator like "prefers-reduced-motion", then the tag is not recognised and the highlighting structure will fail from now on

Hint: As far as I know, it is an Apple-Only feature. But it would be nice, if this wouldn't break the structure for all of us.
Comment 1 Peter Möller 2018-06-10 11:22:26 UTC
Just an idea: Instead of adding such a tag to the rule, it might be the better approach that the structure of the mediatype statement is recognised (by regex?). Then the opening brace would help already to find the structure again, even if a tag is unknown ;-)
Comment 2 Dominik Haumann 2019-01-30 21:46:27 UTC
Can you please attach a screenshot with the broken version? In my version it looks fine.
Comment 3 Peter Möller 2019-01-31 11:06:53 UTC
Created attachment 117761 [details]
Screenshot of Editor, showing highlighted css code
Comment 4 Peter Möller 2019-01-31 11:07:15 UTC
Hi Dominik,

You're right. Don't know, which version solved this, but I may confirm it is gone in Kate V 17.12.3.

Will add a screenshot also.
Comment 5 Dominik Haumann 2019-01-31 11:10:40 UTC
For me it looks like this: https://i.imgur.com/mpat16I.png
There were several major updates in the CSS highlighting, so I assume it's fixed.