Subject: bug#72597: 30.0.60; Eglot: MarkedString with embedded Carriage Return

From: Eli Zaretskii <[email-masked]>
Date: Wed, 14 Aug 2024 07:37:01 +0300

> From: Troy Brown <[email-masked]>
> Date: Tue, 13 Aug 2024 17:35:57 -0400
> Cc: Felician Nemeth <[email-masked]>, Eli Zaretskii <[email-masked]>, [email-masked]
> 
> On Tue, Aug 13, 2024 at 2:45 PM João Távora <[email-masked]> wrote:
> >
> > On Tue, Aug 13, 2024 at 7:32 PM Felician Nemeth
> > <[email-masked]> wrote:
> >
> > > The way I understand it, Eglot calls gfm-view-mode to format this text.
> > > So even if the observed behavior is not in line with the LSP
> > > specification, it is the fault of gfm-view-mode and not directly
> > > Eglot's.
> > >
> > > gfm-view-mode is part of the markdown-mode package, which is NonGNU
> > > ELPA.
> >
> > Very correct.  Worth noting, though, that markdown-mode is an _optional_
> > dependency of Eglot. It doesn't need it (but it will use it if it finds it).
> >
> 
> I don't think it's gfm-view-mode's fault.  I can get the same
> problematic behavior with MarkupContent of "plaintext" (which uses
> text-mode), as follows:
> 
> (eglot--format-markup '(:value "foo\rbar" :kind "plaintext"))

Can you please answer my question whether this is standard-complying
behavior according to LSP protocol?  IOW, what is the source of the
assumption that CR characters will be interpreted as newlines in these
cases?