From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59691: Html-like constructs fail in typescript Date: Tue, 29 Nov 2022 22:01:01 +0100 Message-ID: <87pmd58ohe.fsf@thornhill.no> References: <8a2af962-4210-d01e-68d4-92d434dd2f9b@secure.kjonigsen.net> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25202"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, jostein@kjonigsen.net, eliz@gnu.org To: 59691@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 29 22:02:10 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 1p07k2-0006MU-5c for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Nov 2022 22:02:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p07jz-0000A5-KU; Tue, 29 Nov 2022 16:02:07 -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 1p07ju-00007w-Gb for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 16:02:02 -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 1p07ju-0003YP-81 for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 16:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p07ju-0000i6-1n for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 16:02:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <8a2af962-4210-d01e-68d4-92d434dd2f9b@secure.kjonigsen.net> Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Nov 2022 21:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59691 X-GNU-PR-Package: emacs Original-Received: via spool by 59691-submit@debbugs.gnu.org id=B59691.16697556662716 (code B ref 59691); Tue, 29 Nov 2022 21:02:02 +0000 Original-Received: (at 59691) by debbugs.gnu.org; 29 Nov 2022 21:01:06 +0000 Original-Received: from localhost ([127.0.0.1]:56314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p07j0-0000hk-4I for submit@debbugs.gnu.org; Tue, 29 Nov 2022 16:01:06 -0500 Original-Received: from out2.migadu.com ([188.165.223.204]:28456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p07ix-0000he-Bn for 59691@debbugs.gnu.org; Tue, 29 Nov 2022 16:01:04 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1669755662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=1UtiQ6jCXUIHAzftdVs1ldknTnuYZ+fdDH5p9juGsKA=; b=MHyv3bpjLWXO6fgdSLJg//7me5w2g429aD4nuer/Hocf8C8i9ayHUHB2bwtpArq4vrsooI 2uOxq7Hhg+hQ2cX+or5v4yOnnrgsBj8OsPtnJtMLqgTE/dvoKpB6FgQowON+P71A+cs34/ MpnlhGcGCFNaVbqQCBC0J7FP/XTt4J6xmy+fCyaqjsO1s5MFPwGEzE2RrAPhXf8Oztb+8G 8kw0/kQyAMqAx3fu1TWUh/ytj5KADTUkOr1U/YWD41NGLeTtWqmoHrrDHywoTVAiMYY7uA ZdMDLCYbU+syS1IH/88zzn0gwrGTaPhp+BU3/4lB2uThXE9mDnG+0y2hfVL74A== X-Migadu-Flow: FLOW_OUT 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:249442 Archived-At: Hi Jostein! I already have a fix for this bug lined up, and will send the fix as soon as I get my other stuff applied. It relies on another patch that is waiting. The solution is to create two modes: typescript-ts-mode and tsx-ts-mode. They have separate parsers, and should be treated as separate languages. That means that in a .ts file we enable the 'typescript' language, and in .tsx we enable the 'tsx' language. This exact issue is why they have two languages. In other words, we cannot support this in typescript-ts-mode. I hope to get this in pretty soon :) Theo