From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Newsgroups: gmane.emacs.bugs Subject: bug#59906: 29.0.60; typescript-ts-mode is not highlighting escape sequences Date: Thu, 8 Dec 2022 18:23:52 +0100 Message-ID: References: <87cz8tdiso.fsf@thornhill.no> Reply-To: jostein@kjonigsen.net 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="8463"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Cc: 59906@debbugs.gnu.org, casouri@gmail.com To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 08 18:25:29 2022 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 1p3KeE-000201-K5 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Dec 2022 18:25:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3Kdx-00041X-3e; Thu, 08 Dec 2022 12:25:09 -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 1p3Kdr-000416-Hj for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 12:25: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 1p3Kdq-0008WF-Ah for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 12:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3Kdp-0001QM-Re for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 12:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jostein =?UTF-8?Q?Kj=C3=B8nigsen?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Dec 2022 17:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59906 X-GNU-PR-Package: emacs Original-Received: via spool by 59906-submit@debbugs.gnu.org id=B59906.16705202485437 (code B ref 59906); Thu, 08 Dec 2022 17:25:01 +0000 Original-Received: (at 59906) by debbugs.gnu.org; 8 Dec 2022 17:24:08 +0000 Original-Received: from localhost ([127.0.0.1]:58025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Kcx-0001Pd-Fl for submit@debbugs.gnu.org; Thu, 08 Dec 2022 12:24:07 -0500 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:55705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Kcw-0001PE-BJ for 59906@debbugs.gnu.org; Thu, 08 Dec 2022 12:24:07 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id D7636320046F; Thu, 8 Dec 2022 12:23:55 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 08 Dec 2022 12:23:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:reply-to:sender :subject:subject:to:to; s=fm1; t=1670520235; x=1670606635; bh=f0 qUNPQc6F/7QHF3T/rQSxb8yG3VsfouA+aBynouitw=; b=D+8b+6El8oSq6/b9d5 5OodaeJe8PCCg3V2BHDaD6cDUZGAP9O3nA/BhWmA8kqDtDFNYwNMykJZGrCPQhig iI67dkzBEcVN/EceU6TBk8mA+LnqNmhcN2zm0IKVI4DYrr9TumBVhiAFRJyHVqlb cIz07fF8hZjh3T7UzzJ+X9OQuMEQDYkTFLd5yYr9MazDUAErhwlDtY8RYuw/y7i2 XtmVgikExhTXLfLq9QmuXwPMaL2/sXoOWmziDeeO6IPHbxhpJuh8jz6cl7idS0y3 yyuLhtHnMf5/kF9Ms/YBWZzkncNV026CjntXIMFCESNoQfykxGcLeupXi989o8r3 YLcA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1670520235; x=1670606635; bh=f0qUNPQc6F/7QHF3T/rQSxb8yG3VsfouA+a Bynouitw=; b=KSKRyNpfZi2wwjSH+v+/PpxIxzfd4n3lIUyDfQ26om2wgqU9q3Y EfAGitpqd1iEoISEzHKsYWniLIlKqkZA9QeC+7UTldOAK6djPqCOax39n9dbZSPq 0Yd16ioTbqdyRegXR8Izt2oR1MTQqeuRJ1gbHvG88RcsZzE+UMiSJrvlANq8azCf Vfw5PgCz+F2YmUtIgWEK2IHV6hLWS20RLAqHwl/R9KS8cBR+oOsNVIHmRExNv5fa RzCTvjMPPtyAB/+hfccoq5jTmDi/sJSLLrEBL1W7EObTWquQI0yimiP+EkI33QKJ pbKFb5MrgsG6xFxfalJXusT7KqquVorsYgg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddtgddutdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfrhfuvfevfhfhjggtgfesthekredttdefjeenucfhrhhomheplfho shhtvghinhcumfhjpphnihhgshgvnhcuoehjohhsthgvihhnsehsvggtuhhrvgdrkhhjoh hnihhgshgvnhdrnhgvtheqnecuggftrfgrthhtvghrnheptdeftdektdffueekvddvvdek ueevuddviedtffffgffggeeltdekhefgtdejkeevnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepjhhoshhtvghinhesshgvtghurhgvrdhkjhho nhhighhsvghnrdhnvght X-ME-Proxy: Feedback-ID: ib2f84088:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Dec 2022 12:23:54 -0500 (EST) Content-Language: nb-NO In-Reply-To: <87cz8tdiso.fsf@thornhill.no> 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:250321 Archived-At: On 08.12.2022 16:19, Theodor Thornhill wrote: > Jostein Kjønigsen writes: > >> In a buffer with typescript-ts-mode activated, write the following code: >> >> const test = "quoted\"string\" contents"; >> >> The entire text, include the \" is highlighted as strings, and escape sequences are not handled: >> >> This code has the following tree-sitter syntax tree: >> >> (lexical_declaration kind: const >> (variable_declarator name: (identifier) value: = >> (string " (string_fragment) (escape_sequence) (string_fragment) (escape_sequence) (string_fragment) ")) >> ;) >> >> In typescript-ts-mode we seemingly have rules to handle fontification of escape sequences: >> >> :language language >> :feature 'escape-sequence >> :override t >> '((escape_sequence) @font-lock-escape-face)) >> >> This feature is however not activated in the major-mode setup: >> >> (setq-local treesit-font-lock-feature-list >> '((comment declaration) >> (keyword string) >> (constant expression identifier number pattern property) >> (bracket delimiter))) >> >> Naively I assumed that simply adding this feature would activate this rule, but still \" is fontified as string. > Yeah, there was an error there. See below patch. > > Yuan, can you install this? > > Theo > Yeah that works for me. Yuan: another vote for installing right here :) -- Jostein