After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795938 - css.lang: Consistency fixes
css.lang: Consistency fixes
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
git master
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2018-05-08 16:33 UTC by Jeffery To
Modified: 2018-05-09 11:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
css.lang: Consistency fixes (3.61 KB, patch)
2018-05-08 16:43 UTC, Jeffery To
none Details | Review
css.lang: Consistency fixes (3.66 KB, patch)
2018-05-09 10:23 UTC, Jeffery To
none Details | Review

Description Jeffery To 2018-05-08 16:33:38 UTC
* At-rules (e.g. @media) at the beginning of a line are highlighted, but at-rules following other rules on the same line are not
* Top-level strings are highlighted, but strings inside style blocks are not
* The equals sign in an attribute selector like [title="Foobar"] is highlighted, but other attribute selector operators (e.g. [class~="required"]) are not
* The general sibling selector (p ~ ul) is highlighted differently than other combinators (div + div, ul > li)

Will attach a patch to address these shortly.
Comment 1 Jeffery To 2018-05-08 16:43:27 UTC
Created attachment 371809 [details] [review]
css.lang: Consistency fixes

* Remove requirement that at-rules start at the beginning of a line
* Add string highlighting to style-block and function contexts
* Rename attribute-value-delimiter context to attribute-selector-delimiter, to clarify purpose
* Rework operators context and rename to attribute-selector-operators
* Add general sibling selector (~) to selector-grammar context
Comment 2 Sébastien Wilmet 2018-05-09 09:30:51 UTC
I have a conflict in git when trying to apply the above patch.

Also, it takes more time for me if you open lots of bugs. I prefer if you open just one bug with "css.lang: various improvements" and attach all the patches there in the good order.

Hopefully GtkSourceView will be migrated to GitLab soon.
Comment 3 Jeffery To 2018-05-09 10:22:04 UTC
I have rebased on current master and will upload a new patch.

Also, will gather future patches in one bug. Thanks for all your help in merging these :-)
Comment 4 Jeffery To 2018-05-09 10:23:22 UTC
Created attachment 371832 [details] [review]
css.lang: Consistency fixes

* Remove requirement that at-rules start at the beginning of a line
* Add string highlighting to style-block and function contexts
* Rename attribute-value-delimiter context to attribute-selector-delimiter, to clarify purpose
* Rework operators context and rename to attribute-selector-operators
* Add general sibling selector (~) to selector-grammar context
Comment 5 Sébastien Wilmet 2018-05-09 11:03:02 UTC
Thanks, pushed as commit b3e895d47a34d8d3dea10748345d248084e68c1e.