From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Troy Brown Newsgroups: gmane.emacs.bugs Subject: bug#74807: 30.0.90; Eglot: Non-Markdown strings rendered as Markdown Date: Wed, 11 Dec 2024 19:46:03 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11533"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Felician Nemeth , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: 74807@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 12 01:47:34 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tLXMc-0002t6-4K for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 Dec 2024 01:47:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLXMK-0004rg-Bp; Wed, 11 Dec 2024 19:47:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLXMC-0004rK-NO for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 19:47:09 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLXM6-00036K-Of for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 19:47:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:MIME-Version:To:Subject; bh=t9w3Xqh4ofTfXsQOVvval77cXIOULfDz/UsqHuxsebE=; b=SJb8ZOZE+SaRjzXg/p61AnbK5KUJQKCJ0X0Z7G3fTAA34xiQ3mmRX9d50D34oQ4qX3D/+oRAMkXHFzCfR42r14OtO9gSF6im70bqybnNL4zKoYndPEMTCSme2AjJb2BtnkDHyznn4jHX4mlz3cOG+VP7Fq1EbFluPayk8zR82VctlGFp04xumLtZDtlQp4+6F1K/RWv19GOin8gb1hDxBUWeDPTWwIa4RBbNllpMLwuvwAaNIWdaM7kkH3pkaIV41sHm5ZYykpwv1bGmCEit2gpqOiHK08XBCSndUTuzYJaTeRARgqwYMgAST1SBR7QSto2vOe1wlVhar6Fqs0fjUg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tLXM6-0006wk-Ho for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 19:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Troy Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Dec 2024 00:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74807 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173396438126378 (code B ref -1); Thu, 12 Dec 2024 00:47:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Dec 2024 00:46:21 +0000 Original-Received: from localhost ([127.0.0.1]:36902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLXLQ-0006rM-U2 for submit@debbugs.gnu.org; Wed, 11 Dec 2024 19:46:21 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:44406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLXLP-0006r9-H8 for submit@debbugs.gnu.org; Wed, 11 Dec 2024 19:46:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLXLP-0004oW-6m for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 19:46:19 -0500 Original-Received: from mail-ej1-f48.google.com ([209.85.218.48]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLXLN-000340-GM for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 19:46:18 -0500 Original-Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-aa69251292dso3679766b.2 for ; Wed, 11 Dec 2024 16:46:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733964374; x=1734569174; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=t9w3Xqh4ofTfXsQOVvval77cXIOULfDz/UsqHuxsebE=; b=j7avH8SoVtNFR+2fqK5LsH75h8GpnCsznwkQ4u4R4eLjg9f17yh+IsRkkSKbPKuu0l qlWxFOvvCTNid5Z1zpX8HdEMyLDvOQ0Yk68SPq41G7lxmed6lUp0B/1F+MnjrhPm+4Y/ CTYV2rjdXv93eHGnpmLwUQO8QX+HmgnzsC/oMrZy/GnHw3DARKA7hNI0XnToXy/Entu4 rD8PQOZKkPG9ZqD4P8NkpniZfffUkf51VAj+/bhBJm0x0vwZT7ow1Z84tJ1dTMZx2Q6b Mr3S06+7IJmWJYn2Gmbi1ks1Pg3XxrPaiwWZvI9Wm4YYRcTDdoNJYLiTVPRdRimQd3FQ X/ow== X-Gm-Message-State: AOJu0YzIaYOXdlwZoLi1yyl5E0Ca8k+Wi9rP28RJtfpM07YAgAd4J64+ FuJ2TAa6xFVMxppodelpru/cFsBFbJLSR9EVaH6gu/KI1nJOLI0D6zxFPOflWKE= X-Gm-Gg: ASbGncuPPlTd+mOLGTd7NhPQEYQh/lDEDpw0XK4bLiDFK/+G/FGjPWVFd5ym6JE1sMk E6AyLML3IBC5v2sWQ9LO1JfWPmIjIJSFQWM5ACqdq1AoGqX1lYvFR9rUl84jRQO1FUTtEiby3Om 5Yd7NkOdFNxCoFeQ2AKJlLzGvh6yv8929/Iza3qJ8KYj85SNvByiHp7QmoptjoyhYAYwnZmvqAE vbU3oAjNF7Q2+Lh2+IbU2cWEPANdMBE4c7uP1CLILcoFnEqTsLQQFYodtWwy8UggaXhxRv6YlIO YFQ3pkDeH/zInD/hW+Ew X-Google-Smtp-Source: AGHT+IHjEoXSrHAj0uGVbYw4DB1Gyly/sXEWW4pgYm3+RgOw2hiQFHtdHqF02nsDxZ+t+eX/vAqDsQ== X-Received: by 2002:a17:906:9d2:b0:aa6:8520:718b with SMTP id a640c23a62f3a-aa6b13df104mr437469766b.56.1733964374362; Wed, 11 Dec 2024 16:46:14 -0800 (PST) Original-Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com. [209.85.218.44]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa69dd81272sm373407266b.161.2024.12.11.16.46.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Dec 2024 16:46:14 -0800 (PST) Original-Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-aa69251292dso3677666b.2 for ; Wed, 11 Dec 2024 16:46:14 -0800 (PST) X-Received: by 2002:a17:906:3cb1:b0:aa6:a501:9b3b with SMTP id a640c23a62f3a-aa6b11a33f8mr481558766b.19.1733964373948; Wed, 11 Dec 2024 16:46:13 -0800 (PST) X-Gmail-Original-Message-ID: Received-SPF: pass client-ip=209.85.218.48; envelope-from=troy.s.brown@gmail.com; helo=mail-ej1-f48.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296878 Archived-At: 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).