Eglot: fix eglot--format-makrup when MARKUP just a string

* lisp/progmodes/eglot.el (eglot--format-markup): Fix case where
markup is string.
This commit is contained in:
João Távora 2026-05-18 23:14:16 +01:00
parent 9ba65aa965
commit 9436d92c5d

View file

@ -2268,7 +2268,7 @@ If MODE, force MODE to be used for fontifying MARKUP."
(t `(#'text-mode))))
(calc (s &optional (forced-mode mode) &aux (x (calc2 forced-mode)))
(setq string s render (car x) extract (or (cadr x) #'buffer-string))))
(cond ((stringp markup) (calc string)) ; plain string
(cond ((stringp markup) (calc markup)) ; plain string
((setq lang (plist-get markup :language)) ; deprecated MarkedString
(calc (format "```%s\n%s\n```" lang (plist-get markup :value))))
(t (calc (plist-get markup :value) ; Assume MarkupContent