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

Open
jadekler opened this issue May 8, 2020 · 1 comment

Comments

@jadekler
Copy link
Member

@jadekler jadekler 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
Copy link
Member

@dmitshur 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 label May 9, 2020
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.