From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#61472: 29.0.60; css{-ts}-mode highlight problem Date: Tue, 14 Feb 2023 03:26:04 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6624"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 To: =?UTF-8?Q?=E7=89=9F_?= =?UTF-8?Q?=E6=A1=90?= , 61472@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 14 02:27:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRk6N-0001YO-QC for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Feb 2023 02:27:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRk65-0003ja-W5; Mon, 13 Feb 2023 20:27:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRk63-0003jQ-Se for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 20:27:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRk62-0000sF-2J for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 20:27:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRk61-0006gf-LH for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 20:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Feb 2023 01:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61472 X-GNU-PR-Package: emacs Original-Received: via spool by 61472-submit@debbugs.gnu.org id=B61472.167633797525648 (code B ref 61472); Tue, 14 Feb 2023 01:27:01 +0000 Original-Received: (at 61472) by debbugs.gnu.org; 14 Feb 2023 01:26:15 +0000 Original-Received: from localhost ([127.0.0.1]:52023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRk5H-0006fc-5X for submit@debbugs.gnu.org; Mon, 13 Feb 2023 20:26:15 -0500 Original-Received: from mail-ej1-f47.google.com ([209.85.218.47]:45665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRk5E-0006fP-Sa for 61472@debbugs.gnu.org; Mon, 13 Feb 2023 20:26:13 -0500 Original-Received: by mail-ej1-f47.google.com with SMTP id dr8so36379342ejc.12 for <61472@debbugs.gnu.org>; Mon, 13 Feb 2023 17:26:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=rSPU1yW1YzuMcBeUnKH4mmM5QF0FMTAxhjcLgC1oPQA=; b=qqmmj8I7r0ebyJ36peCj5w63aYoUNhUWe94GGWEyrGgDykiKr7qlUe/Oyo3hUdcVJ5 hIOHDnrZ+55hnyaO2NHzNd+KnpTe1THXt7u6v+Qp5gnLUjsjiCtaxYc5RRWv+ZfP/NY4 0caQUhd8GX8PH6v7u5QXyOInXlRhIXVtUvgF0mLnRqWDbDadhacL6b/FfMbeQHWARExo OI0mnBEGVCEkcjQ9SPEMirK+r2wJchm7MF2eErkKWHeJ2vvJaFs1H2Q8O1wNC/APz+DI 9YamSu0QR1Fqh2GoFY8lbgdjMlCz5ny9Ym4sxbNETHL3INYqzTWOQAP4brbcrPUW53aW 9f2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rSPU1yW1YzuMcBeUnKH4mmM5QF0FMTAxhjcLgC1oPQA=; b=oO2xWuH8oX+eFuglbbLK71fpkiV69iGXIrvkyStHCwaXQtp2o4cK4gAl3G3gcJf7G6 bnNId4z18hK7fJ1D4CWEsA0daX2wApMcoOl81DHYj+s4byF2ObBQOpI37QP2dLT38aFt qJEmDsjNukQlgTERIMJV3tUVXVN02MQtkUPfuiP0cCdiAsrkMgXfGEnfAVMwVMvh/PD9 xbnG2EdslLktjAcd+wescbwlH+AfKyKUDRbMTkhQvKvc+eQi3QSCDj8nracEbR4cqF9b GP81Mx1m1TwANSTozYRpkq+ertzWuBYCdZuJTbLg99XFbXMPQJu4/RsUCdO+o3mXaFwn 7V3A== X-Gm-Message-State: AO0yUKUBx9Q14e33JnOz0TKUBGxThYpK81wwyFUB0hjFhFAWUkPKcpJ/ lpsF04WVwGQpfoL7Fn4q9Fo= X-Google-Smtp-Source: AK7set/k2GqeJTssuJ0uYd8AGlrwwQ3ZDZXE/7gh5QPbhCILBVe6BxP9eIawTm+yp0g9f/QYwD3zrA== X-Received: by 2002:a17:906:fb84:b0:878:7291:d558 with SMTP id lr4-20020a170906fb8400b008787291d558mr1122785ejb.34.1676337966891; Mon, 13 Feb 2023 17:26:06 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id i12-20020a170906250c00b008adc971f5acsm7653640ejb.178.2023.02.13.17.26.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Feb 2023 17:26:06 -0800 (PST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255535 Archived-At: 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 that > >> In 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 ~=).