GNU bug report logs - #74807
30.0.90; Eglot: Non-Markdown strings rendered as Markdown

Previous Next

Package: emacs;

Reported by: Troy Brown <brownts <at> troybrown.dev>

Date: Thu, 12 Dec 2024 00:47:02 UTC

Severity: normal

Found in version 30.0.90

Full log


View this message in rfc822 format

From: João Távora <joaotavora <at> gmail.com>
To: Troy Brown <brownts <at> troybrown.dev>
Cc: 74807 <at> debbugs.gnu.org, felician.nemeth <at> gmail.com
Subject: bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown
Date: Thu, 12 Dec 2024 08:30:05 +0000
[Message part 1 (text/plain, inline)]
Please provide more of the eglot events log.

Thanks,
João

On Thu, Dec 12, 2024, 00:46 Troy Brown <brownts <at> troybrown.dev> wrote:

> I've run across a situation where Eglot receives a documentation
> string as part of a "completionItem/resolve".  The documentation is
> being provided as a regular "string", not MarkupContent, yet it is
> being rendered as markup.  Since the string contains characters which
> are being interpreted as markdown (e.g., ":"), it causes the
> documentation to be rendered incorrectly.
>
> [jsonrpc] e[19:22:22.458]     <-- completionItem/resolve[21]
>
> {"jsonrpc":"2.0","id":21,"result":{"label":"End_Of_Line","documentation":"End
> of line sequence: lf | crlf","data":["Format","End_Of_Line"]}}
>
> I believe this is because `eglot-completion-at-point` calls
> `eglot--format-markup` for the documentation string provided in the
> CompletionItem without first checking to see if it really should be
> formatted (i.e., if it is a string it shouldn't be formatted).  While
> `eglot--format-markup` will handle strings, it should only be passed
> strings which are intended to be markup formated (specified as
> MarkedString in the specification).
>
> I believe this issue might affect more than just the documentation
> string for CompletionItem, it's possible this also affects other
> places which specify fields as "string | MarkupContent" (such as the
> SignatureInformation documentation field).
>
[Message part 2 (text/html, inline)]

This bug report was last modified 157 days ago.

Previous Next


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