Thanks to visit codestin.com
Credit goes to github.com

Skip to content

text: support fenced code blocks in Markdown#4585

Merged
wchargin merged 2 commits into
tensorflow:masterfrom
cghawthorne:fenced-code
Jan 21, 2021
Merged

text: support fenced code blocks in Markdown#4585
wchargin merged 2 commits into
tensorflow:masterfrom
cghawthorne:fenced-code

Conversation

@cghawthorne
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Contributor

@googlebot I consent.

Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants