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
Milestone

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Sep 7, 2019

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 label Sep 7, 2019
@stamblerre stamblerre added the NeedsFix 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 label Sep 9, 2019
@JAicewizard

This comment has been minimized.

Copy link

@JAicewizard 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

This comment has been minimized.

Copy link
Contributor Author

@stamblerre stamblerre commented Sep 27, 2019

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

@JAicewizard

This comment has been minimized.

Copy link

@JAicewizard 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

This comment has been minimized.

Copy link
Contributor Author

@stamblerre stamblerre commented Sep 27, 2019

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

This comment has been minimized.

Copy link
Contributor Author

@stamblerre stamblerre commented Oct 4, 2019

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

@stamblerre stamblerre closed this Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.