GNU bug report logs - #59691
29.0.60; typescript-ts-mode: any HTML-like elements causes fontification to become invalid and remaining parse-tree to become jsx-expression

Previous Next

Package: emacs;

Reported by: jostein <at> kjonigsen.net

Date: Tue, 29 Nov 2022 20:04:01 UTC

Severity: normal

Found in version 29.0.60

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 59691 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: 59691 <at> debbugs.gnu.org, casouri <at> gmail.com, jostein <at> kjonigsen.net
Subject: Re: Html-like constructs fail in typescript
Date: Wed, 30 Nov 2022 14:35:49 +0200
> From: Theodor Thornhill <theo <at> thornhill.no>
> Cc: jostein <at> kjonigsen.net, casouri <at> gmail.com, eliz <at> gnu.org
> Date: Tue, 29 Nov 2022 22:01:01 +0100
> 
> 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.

This means the script posted by Yuan, which only creates a single grammar
library for Typescript (the one for tsx), should be changed to instead
produce two libraries, right?




This bug report was last modified 2 years and 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.