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: format godoc comments as markdown correctly #34161

Closed
stamblerre opened this issue Sep 7, 2019 · 5 comments
Closed

x/tools/gopls: format godoc comments as markdown correctly #34161

stamblerre opened this issue Sep 7, 2019 · 5 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@stamblerre
Copy link
Contributor

Forked from #29151:

As I'm sure you are aware, note that Go doc strings are not Markdown but rather have their own minimalistic formatting. For them to display with formatting correctly they will need to be converted to Markdown before returning them if we want them to show up formatted in the editor correctly. See microsoft/vscode-go#2245 where I implemented this transformation albeit in JS and here it is needed in Go.

@gopherbot gopherbot added this to the Unreleased milestone Sep 7, 2019
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Sep 7, 2019
@stamblerre stamblerre added the NeedsFix The path to resolution is known, but the work has not been done. label Sep 7, 2019
@stamblerre stamblerre changed the title x/tools/gopls: format go doc comments as markdown correctly x/tools/gopls: format godoc comments as markdown correctly Sep 7, 2019
@stamblerre stamblerre added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 9, 2019
@JAicewizard
Copy link

JAicewizard commented Sep 27, 2019

do you still need a port of the ts markdown escape?

@golang golang deleted a comment from gopherbot Sep 27, 2019
@stamblerre
Copy link
Contributor Author

@JAicewizard: Yes, we do. We haven't done any of the work to resolve this issue yet.

@JAicewizard
Copy link

JAicewizard commented Sep 27, 2019

@stamblerre
I would like to finish this issue, I have a branch with a comment.go and comment_test.go. I wanted to add the tests to tests/ but it tested some private functions as well that shouldn't really be exported.
I think it would be better to merge it with go/doc/comment.go but that would take another release cycle.

@stamblerre
Copy link
Contributor Author

If you'd like to contribute your change to gopls, please send us a CL so we can review it. We can discuss on the CL if it's something that should be merged into go/doc. In either case, the x/tools repo has to be compatible with older Go versions, so even if it makes it into 1.14, we would probably have to use a copy in x/tools for a few more cycles.

@stamblerre
Copy link
Contributor Author

For some reason CL 197760 wasn't associated with this issue. Closing as it has been merged now.

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. NeedsFix The path to resolution is known, but the work has not been done. 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