Bug 340756

Summary: [PATCH] support for CartoCSS is not available
Product: [Applications] kate Reporter: Lukas Sommer <sommerluk>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: cullmann, sommerluk
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In:
Attachments: mss.xml
mss.xml
highlight.mss
mss.xml
highlight.mss

Description Lukas Sommer 2014-11-08 09:28:53 UTC
CartoCSS is a language (inspired by CSS and with some similarities to CSS) to create rendering styles for geodata. Mapnik provides an implimentation as free software.

CartoCSS is currently used by OpenStreetMap for their default rendering style.

katepart/syntax does not provide any highlighting for this type of file. It would be nice to have this.

Reproducible: Always
Comment 1 Lukas Sommer 2014-11-08 09:32:29 UTC
Created attachment 89500 [details]
mss.xml

A syntax highlighting file for CartoCSS
Comment 2 Christoph Cullmann 2014-12-14 17:19:01 UTC
Hi, should the mss not contain at least the known commands/key-words, too?
Comment 3 Lukas Sommer 2014-12-19 13:17:33 UTC
Created attachment 90049 [details]
mss.xml

revised version of mss.xml with keyword list
Comment 4 Lukas Sommer 2014-12-19 13:18:55 UTC
Created attachment 90050 [details]
highlight.mss

a test file
Comment 5 Lukas Sommer 2014-12-19 13:25:47 UTC
Hi.

Your idea of a well-defined list of commands is fine. CartoCSS does not have real keywords (like in C++). There is only “true”, “false” and some mathematical operators. But it has a long, but limited and defined list of available properties. The mss.xml has been revised and the changes that you have requested have been done.
Comment 6 Lukas Sommer 2014-12-19 13:48:35 UTC
Created attachment 90051 [details]
mss.xml

add support for numbers that start with a dot (“.5” as short-hand for “0.5”)
Comment 7 Lukas Sommer 2014-12-19 13:49:08 UTC
Created attachment 90052 [details]
highlight.mss

add support for numbers that start with a dot (“.5” as short-hand for “0.5”)
Comment 8 Christoph Cullmann 2015-07-11 14:54:52 UTC
Git commit e87d51f431260dff77a30ed439cfafda92f64b95 by Christoph Cullmann.
Committed on 11/07/2015 at 14:54.
Pushed by cullmann into branch 'master'.

add CartoCSS hl by Lukas Sommer
renamed to carto-css.xml + added the test + removed the mime-type, else we might get clashs with normal CSS

A  +227  -0    autotests/input/syntax/carto-css/results/test.mss.reference.html
A  +213  -0    autotests/input/syntax/carto-css/test.mss
A  +405  -0    src/syntax/data/carto-css.xml

http://commits.kde.org/ktexteditor/e87d51f431260dff77a30ed439cfafda92f64b95