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

feat(internal/godocfx): add prettyprint class to code blocks #3819

Merged
merged 3 commits into from
Mar 16, 2021

Conversation

tbpg
Copy link
Contributor

@tbpg tbpg commented Mar 15, 2021

Fixes #3804.

@tbpg tbpg added the automerge Merge the pull request once unit tests and other checks pass. label Mar 15, 2021
@tbpg tbpg requested a review from codyoss March 15, 2021 19:04
@tbpg tbpg requested a review from a team as a code owner March 15, 2021 19:04
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 15, 2021
Copy link
Member

@codyoss codyoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one question.


func (r *codeBlockHTMLRenderer) renderCodeBlock(w util.BufWriter, source []byte, n ast.Node, entering bool) (ast.WalkStatus, error) {
if entering {
_, _ = w.WriteString(`<pre><code class="prettyprint">`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the errors for this write method be returned?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks!

@codyoss codyoss removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

internal/godocfx: better styling of package doc
2 participants