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/present: comments don't show up in fenced code blocks (in Markdown syntax) #38959

Closed
jeanbza opened this issue May 8, 2020 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@jeanbza
Copy link
Member

jeanbza commented May 8, 2020

Given,

# Some title
7 May 2020

Some Name

## Section

Hello

```
// Foo
Bar
```

World

It renders as,

Screen Shot 2020-05-08 at 11 26 35

Note that // Foo is not shown.

@gopherbot gopherbot added this to the Unreleased milestone May 8, 2020
@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 9, 2020
@dmitshur
Copy link
Contributor

dmitshur commented May 9, 2020

That behavior does not seem to be intended per documentation at https://pkg.go.dev/golang.org/x/tools/present#hdr-Markdown_Syntax, specifically:

Lines beginning with "//" (outside of code blocks, of course) are treated as present comments and have no effect.

/cc @rsc

@dmitshur dmitshur changed the title x/blog: comments don't show up in code blocks x/blog: comments don't show up in code blocks, in Markdown syntax May 9, 2020
@dmitshur dmitshur changed the title x/blog: comments don't show up in code blocks, in Markdown syntax x/tools/present: comments don't show up in fenced code blocks (in Markdown syntax) May 9, 2020
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label May 9, 2020
@seankhliao
Copy link
Member

Closing as this appears to be working as intended

@golang golang locked and limited conversation to collaborators Oct 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants