|
From: | Dmitry Gutov |
Subject: | bug#61472: 29.0.60; css{-ts}-mode highlight problem |
Date: | Tue, 14 Feb 2023 03:26:04 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
On 13/02/2023 11:10, 牟 桐 wrote:
When I'm checking the [offical doc](https://www.w3.org/TR/CSS21/syndata.html#characters), I saw thatIn CSS, identifiers can contain only the characters [a-zA-Z0-9] and ISO 10646 characters U+00A0 and higher, plus the hyphen (-) and the underscore (_)I don't know whether the major mode is designed to work like this (since the official said the `.` `#` ... are invalid, perhaps the browser made them work) or is the major mode's bug. Thanks 😉
The parser indeed doesn't seem to be able to parse that text. I'm not sure whether it's an unofficial extension, or it's simply not expected to work in CSS files.
If it's the former, and the browsers support it, filing an issue at the grammar repo could help: https://github.com/tree-sitter/tree-sitter-css/issues
If it's the latter, here's some advice at the end of this answer: https://stackoverflow.com/a/32273294/615245 (to use ~=).
[Prev in Thread] | Current Thread | [Next in Thread] |