all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Troy Brown <brownts@troybrown.dev>
Cc: 74807@debbugs.gnu.org, felician.nemeth@gmail.com
Subject: bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown
Date: Thu, 12 Dec 2024 08:30:05 +0000	[thread overview]
Message-ID: <CALDnm53iKC=4XY5M=1HZXZBMCZbxmLgabM1inuZrpdQ0k5Voug@mail.gmail.com> (raw)
In-Reply-To: <CABvCZ42xu6aAhsmqxZm=PJ6=PX4YWsJkqT=RGreV4bRVPPiFgw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1467 bytes --]

Please provide more of the eglot events log.

Thanks,
João

On Thu, Dec 12, 2024, 00:46 Troy Brown <brownts@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).
>

[-- Attachment #2: Type: text/html, Size: 2027 bytes --]

  reply	other threads:[~2024-12-12  8:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12  0:46 bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown Troy Brown
2024-12-12  8:30 ` João Távora [this message]
2024-12-12 13:32   ` Troy Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALDnm53iKC=4XY5M=1HZXZBMCZbxmLgabM1inuZrpdQ0k5Voug@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=74807@debbugs.gnu.org \
    --cc=brownts@troybrown.dev \
    --cc=felician.nemeth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.