GNU bug report logs -
#75580
30.0.93; statements inside string interpolation for csharp modes
are fontified incorrectly
Previous Next
Full log
View this message in rfc822 format
Ping! Theo and Jostein, could you please comment?
> From: Yuan Fu <casouri <at> gmail.com>
> Date: Fri, 17 Jan 2025 23:56:51 -0800
> Cc: Sami Batuhan Basmaz Ölmez <sb.basmazolmez <at> gmail.com>,
> 75580 <at> debbugs.gnu.org,
> Theodor Thornhill <theo <at> thornhill.no>,
> Jostein Kjønigsen <jostein <at> kjonigsen.net>
>
>
>
> > On Jan 16, 2025, at 7:42 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> >> From: Sami Batuhan Basmaz Ölmez <sb.basmazolmez <at> gmail.com>
> >> Date: Wed, 15 Jan 2025 08:02:50 +0000
> >>
> >> An interpolated string `$"string content {myFunction(myVariable)}
> >> another string content"` are highlighted incorrectly as expressions
> >> inside brackets are also fontified with string face for csharp-mode and
> >> csharp-ts-mode. They should be fontified like statements.
> >> Interpolation occurs inside curly braces.
> >
> > Thank, but could you please post a minimal C# source file that
> > exhibits this behavior?
> >
> > Yuan, any comments about this?
>
> The direct cause is that the font-lock rules for strings have :override flag, and string face is applied on the whole string, overriding whatever fontification the function invocation had. But the string rule has :override for a reason, the Theo and Jostein should know more.
>
> Yuan
This bug report was last modified 160 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.