Bug 340756 - [PATCH] support for CartoCSS is not available
Summary: [PATCH] support for CartoCSS is not available
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: syntax (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-08 09:28 UTC by Lukas Sommer
Modified: 2015-07-11 14:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
mss.xml (6.40 KB, text/plain)
2014-11-08 09:32 UTC, Lukas Sommer
Details
mss.xml (17.45 KB, text/plain)
2014-12-19 13:17 UTC, Lukas Sommer
Details
highlight.mss (4.94 KB, text/plain)
2014-12-19 13:18 UTC, Lukas Sommer
Details
mss.xml (17.46 KB, text/plain)
2014-12-19 13:48 UTC, Lukas Sommer
Details
highlight.mss (4.94 KB, text/plain)
2014-12-19 13:49 UTC, Lukas Sommer
Details

Note You need to log in before you can comment on or make changes to this bug.
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