Skip to content

css.lang (and family): Improve comment (and identifier/string) handling

Jeffery To requested to merge jefferyto/gtksourceview:css-comments into master

The core changes for this set of updates are:

  • Allow comments in more places. Some are more obvious:

    @media (min-aspect-ratio: 16 /* comment */ / 9) { ... }
    div:nth-child(2n /* comment */ + 1) { ... }

    others are less obvious:

    div:/* comment */after { ... }
  • Fixing/updating the scss/less declaration value regexes to account for comments (and quoted strings and function calls) when detecting whether a line is a selector (input:focus { ... }) or a declaration value (display:block;).

There are also some other smaller fixes/changes, mainly centered around identifier/string handling.

Merge request reports