Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: hover text does not escape html tag-like text #47457

Closed
kortschak opened this issue Jul 29, 2021 · 1 comment
Closed

x/tools/gopls: hover text does not escape html tag-like text #47457

kortschak opened this issue Jul 29, 2021 · 1 comment
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@kortschak
Copy link
Contributor

What did you do?

Hover over the call to hi in the following code:

package main

import "fmt"

// hi prints <Hi!>.
func hi() {
	fmt.Println("<Hi!>")
}

func main() {
	hi()
}

What did you expect to see?

The doc comment as written in the code and a correctly formatted contextual menu.

What did you see instead?

Missing text and a broken contexual menu.

screen

Note the absence of "<Hi!>".

This appears to be due to the angle brackets being interpreted as an html tag. This is confirmed with the following code

package main

import "fmt"

// hi prints <i>hi</i>.
func hi() {
	fmt.Println("<Hi!>")
}

func main() {
	hi()
}

which shows a correctly constructed contextual menu and italicised "hi".

italic

Build info

golang.org/x/tools/gopls v0.6.9
    golang.org/x/tools/gopls@(devel)
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/google/go-cmp@v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY=
    golang.org/x/sync@v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
    golang.org/x/sys@v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
    golang.org/x/tools@v0.1.1-0.20210319172145-bda8f5cee399 h1:O5bm8buX/OaamnfcBrkjn0SPUIU30jFmaS8lP+ikkxs=
    golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
    honnef.co/go/tools@v0.1.1 h1:EVDuO03OCZwpV2t/tLLxPmPiomagMoBOgfPt0FM+4IY=
    mvdan.cc/gofumpt@v0.1.0 h1:hsVv+Y9UsZ/mFZTxJZuHVI6shSQCtzZ11h1JEFPAZLw=
    mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Jul 29, 2021
@gopherbot gopherbot added this to the Unreleased milestone Jul 29, 2021
@kortschak
Copy link
Contributor Author

kortschak commented Jul 29, 2021

Apologies, this looks like it is an issue in the ST popups library, facelessuser/sublime-markdown-popups#112.

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.7.2 Aug 6, 2021
@golang golang locked and limited conversation to collaborators Aug 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants