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

text: support fenced code blocks in Markdown #4585

Merged
merged 2 commits into from
Jan 21, 2021

Conversation

cghawthorne
Copy link
Contributor

  • Motivation for features / changes

My particular use case is dumping a json config file, but the fenced code syntax is pretty common in markdown and I suspect it will have lots of uses.

https://www.markdownguide.org/extended-syntax/#fenced-code-blocks

  • Technical description of changes

Just adds the fenced_code extension.

  • Screenshots of UI changes

image

  • Detailed steps to verify changes work correctly (as executed by you)

Log a text event with a fenced code block, verify it renders correctly.

  • Alternate designs / implementations considered

I don't know another good way to include a block of preformatted text.

My particular use case is dumping a json config file, but the fenced code syntax is pretty common in markdown and I suspect it will have lots of uses.

https://www.markdownguide.org/extended-syntax/#fenced-code-blocks
@google-cla google-cla bot added the cla: yes label Jan 21, 2021
@wchargin
Copy link
Contributor

Thanks for the PR! This seems pretty reasonable to me. Let me take a
quick check to make sure that this works internally.

I don't know another good way to include a block of preformatted text.

You can prepend four spaces to each line, thus:

```
I am
a code block.
```

I am normal text.

    I am also
    a code block.

But fenced code blocks are often more convenient, to be sure.

@wchargin wchargin self-requested a review January 21, 2021 01:17
@google-cla
Copy link

google-cla bot commented Jan 21, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Jan 21, 2021
@wchargin wchargin added cla: yes and removed cla: no labels Jan 21, 2021
@wchargin
Copy link
Contributor

@googlebot I consent.

Copy link
Contributor

@wchargin wchargin left a comment

Choose a reason for hiding this comment

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

Thanks!

@wchargin
Copy link
Contributor

(Test sync passes: http://cl/352909055.)

@wchargin wchargin changed the title Enable fenced code blocks in text summaries text: support fenced code blocks in Markdown Jan 21, 2021
@wchargin wchargin merged commit 4f11a20 into tensorflow:master Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants