# Rustdoc should support GitHub's note/warning blockquote syntax

**URL:** <https://internals.rust-lang.org/t/rustdoc-should-support-githubs-note-warning-blockquote-syntax/19532>\
**Category:** tools and infrastructure\
**Created:** [September 9, 2023, 5:58pm UTC](https://internals.rust-lang.org/t/rustdoc-should-support-githubs-note-warning-blockquote-syntax/19532 "2023-09-09T17:58:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KSXGitHub](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/ksxgithub/32/5582_2.png) [@KSXGitHub](https://internals.rust-lang.org/u/KSXGitHub)\
**Post date:** [September 9, 2023, 5:58pm UTC](https://internals.rust-lang.org/t/rustdoc-should-support-githubs-note-warning-blockquote-syntax/19532/1 "2023-09-09T17:58:08Z")

</div>

This is what it looks like: [https://github.com/orgs/community/discussions/16925](https://github.com/orgs/community/discussions/16925)

The syntax is now supported by GitHub.

UPDATE 1: There is a discussion in CommonMark about this: [⚠️ GitHub is beta testing their own Admonition syntax. We should weigh in - Extensions - CommonMark Discussion](https://talk.commonmark.org/t/github-is-beta-testing-their-own-admonition-syntax-we-should-weigh-in/4173)

UPDATE 2: It seems Docusaurus aren't too fond of this: [GFM like admonitions/callouts · Issue #7471 · facebook/docusaurus · GitHub](https://github.com/facebook/docusaurus/issues/7471)

---

<div class="post-metadata">

**Author:** ![mathstuf](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@mathstuf](https://internals.rust-lang.org/u/mathstuf)\
**Post date:** [September 9, 2023, 6:41pm UTC](https://internals.rust-lang.org/t/rustdoc-should-support-githubs-note-warning-blockquote-syntax/19532/2 "2023-09-09T18:41:12Z")

</div>

My first question: Is Rustdoc using GFM? If not, why grab this syntax? I'd rather see efforts to getting it into CommonMark before just picking it up wholesale.

---

<div class="post-metadata">

**Author:** ![Nemo157](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/nemo157/32/11585_2.png) [@Nemo157](https://internals.rust-lang.org/u/Nemo157)\
**Post date:** [September 9, 2023, 7:01pm UTC](https://internals.rust-lang.org/t/rustdoc-should-support-githubs-note-warning-blockquote-syntax/19532/3 "2023-09-09T19:01:57Z")

</div>

I agree something with markdown syntax would be nice, but the decision was made to just offer an HTML class for this:

> <https://github.com/rust-lang/rust/pull/106561>
>
> Fixes https://github.com/rust-lang/rust/issues/79710.
> 
> You can test it \[here\](…https://rustdoc.crud.net/imperio/warning-block/foo/struct.Foo.html). It currently looks like this:
> 
> !\[image\](https://user-images.githubusercontent.com/3050060/211413494-e1cf04e4-c081-4a9d-97db-27329405cfa7.png)
> 
> So a few things to note:
> 
> \* Since it's a new add and it's changing the UI, we'll need to go through an FCP.
> \* Does the UI looks good?
> \* Is the way picked to add a warning block ok for everyone? The discussion on the issue seemed to be in favour of this solution but it doesn't hurt to double-check.
> 
> cc @rust-lang/rustdoc

---

<div class="post-metadata">

**Author:** ![KSXGitHub](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/ksxgithub/32/5582_2.png) [@KSXGitHub](https://internals.rust-lang.org/u/KSXGitHub)\
**Post date:** [September 9, 2023, 8:33pm UTC](https://internals.rust-lang.org/t/rustdoc-should-support-githubs-note-warning-blockquote-syntax/19532/4 "2023-09-09T20:33:53Z")

</div>

Related: [⚠️ GitHub is beta testing their own Admonition syntax. We should weigh in - Extensions - CommonMark Discussion](https://talk.commonmark.org/t/github-is-beta-testing-their-own-admonition-syntax-we-should-weigh-in/4173)

Which also leads to the same GitHub discussion.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [December 8, 2023, 8:33pm UTC](https://internals.rust-lang.org/t/rustdoc-should-support-githubs-note-warning-blockquote-syntax/19532/5 "2023-12-08T20:33:58Z")

</div>

Closed on December 8, 2023, 8:33pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
