Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use common Double Quotes for Columns #4940

Conversation

MaikBusch78
Copy link
Contributor

@MaikBusch78 MaikBusch78 commented Mar 6, 2024

Fixes: no officially reported issue

Changes proposed in this pull request:

  • column names in the style files are usually not quoted or double quoted there needed

Test rendering with links to the example places:

  • tested with carto; the generated project.xml files before and after are identical

@imagico
Copy link
Collaborator

imagico commented Mar 6, 2024

Same comments as in #4939 (review) apply. In addition - some guidance would be important describing when double quotes are required and when not.

@MaikBusch78
Copy link
Contributor Author

Attribute quoting is needed iff the attribute name does not match the regex [a-zA-Z0-9_][a-zA-Z0-9_-]*, see here https://github.com/mapbox/carto/blob/305107201d4f8c4a2b9118c0077dde904f4224ed/build/tmlanguage_template.js#L50C78-L50C104.

@MaikBusch78
Copy link
Contributor Author

MaikBusch78 commented Mar 7, 2024

I have also tested this change now. I produced a project.xml with carto project.mml > project.xml.1 before my change and after my change with carto project.mml > project.xml.2. Both project.xml files are identical (i used md5sum). I have also greped into the changed files to be sure that the input is really different.

@MaikBusch78
Copy link
Contributor Author

So my own doubt that a rendering with the selector ['construction' = 'subway'] compared to a selector [construction = 'subway'] might be different, is at least for mapnik based rendering with a generated project.xml not valid.

@MaikBusch78
Copy link
Contributor Author

@imagico What can i do to get your approval here too ?

@imagico imagico merged commit 91f11ec into gravitystorm:master Apr 16, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants