Bug 340756

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

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]

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]

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

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

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]

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]

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