tree-sitter / tree-sitter-css

CSS grammar for Tree-sitter
MIT License
88 stars 34 forks source link

feature: Support escape charater #54

Open Huliiiiii opened 1 month ago

Huliiiiii commented 1 month ago

Did you check the tree-sitter docs?

Is your feature request related to a problem? Please describe.

The current Tree-sitter CSS grammar does not handle escaped characters in CSS strings, selectors, or identifiers as expected.

Describe the solution you'd like

      ↓ /* Escape charater for class name */
.hover\:bg-blue-600::before {
  content: "\f123"; /* Unicode character escaped */
}

Tree-sitter CSS grammar should support parsing of escaped characters in all valid CSS contexts, including but not limited to:

Describe alternatives you've considered

n/a

Additional context

No response