Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Asterisk seems to be treated specially in documentation preview #1486

Closed
jawnsy opened this issue Jan 29, 2018 · 4 comments
Closed

Asterisk seems to be treated specially in documentation preview #1486

jawnsy opened this issue Jan 29, 2018 · 4 comments

Comments

@jawnsy
Copy link

jawnsy commented Jan 29, 2018

Description

Documentation preview requires an asterisk to be escaped, while godoc does not require the escaping. This is a pretty minor issue but I'd expect vscode-go to behave as close to godoc as possible.

Actual behavior

This comment:

// ValidFileName returns nil if the string is a valid file name, or an
// error otherwise. If pattern is true, file glob patterns are permitted
// ("*" and "?", e.g. "abc*")

is rendered like so:

actual

Notice that the * is missing between "".

Expected behavior

godoc -http renders it like so:

godoc

I'd expect this to be correct, though I haven't read godoc spec.

Workaround

You can escape the * in the comment (\*), like so:

// ValidFileName returns nil if the string is a valid file name, or an
// error otherwise. If pattern is true, file glob patterns are permitted
// ("\*" and "?", e.g. "abc*")

Then it appears to be rendered as expected:

workaround

Version info

vscode-go 0.6.73

VSCode version info (OS: Windows 10):

Version 1.19.2
Commit 490ef761b76b3f3b3832eff7a588aac891e5fe80
Date 2018-01-10T15:55:03.538Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Jan 29, 2018

Thanks for reporting!
Seems to be an issue with VS Code and not the Go extension.
I get similar issues on hover text when using typescript

@ramya-rao-a
Copy link
Contributor

This issue was moved to microsoft/vscode#42353

@ramya-rao-a
Copy link
Contributor

Reopening as the upstream issue was closed

@ramya-rao-a ramya-rao-a reopened this Mar 2, 2018
segevfiner added a commit to segevfiner/vscode-go that referenced this issue Jan 12, 2019
segevfiner added a commit to segevfiner/vscode-go that referenced this issue Jan 12, 2019
segevfiner added a commit to segevfiner/vscode-go that referenced this issue Jan 12, 2019
segevfiner added a commit to segevfiner/vscode-go that referenced this issue Jan 13, 2019
segevfiner added a commit to segevfiner/vscode-go that referenced this issue Jan 13, 2019
segevfiner added a commit to segevfiner/vscode-go that referenced this issue Jan 13, 2019
segevfiner added a commit to segevfiner/vscode-go that referenced this issue Jan 15, 2019
segevfiner added a commit to segevfiner/vscode-go that referenced this issue Jan 21, 2019
segevfiner added a commit to segevfiner/vscode-go that referenced this issue Jan 24, 2019
segevfiner added a commit to segevfiner/vscode-go that referenced this issue Feb 7, 2019
vladbarosan pushed a commit to segevfiner/vscode-go that referenced this issue Mar 21, 2019
vladbarosan pushed a commit to segevfiner/vscode-go that referenced this issue Mar 22, 2019
@ramya-rao-a
Copy link
Contributor

I no longer see this issue with the latest VS Code

Screen Shot 2020-01-27 at 4 56 01 PM

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants