Replies: 220 comments 593 replies
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
How about Edit: Also, to add to this, maybe extend this behaviour to other parts such as headers in block quotes? I like to use headers because of their larger font size, but right now are they not included in this. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for this! Any way to customize the text? It would be very useful for non-English documents. |
Beta Was this translation helpful? Give feedback.
-
|
This is amazing 🔥 . This is now getting more features similar to AsciiDocs and AsciiDoctor 🎉 |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
Would love to see more callouts too for different use-cases. These 5 below might be good to start with! I'm not sure if this is only for documentation, but I would use it in general issues and other places supporting markdown. I would especially like to see one that is red in terms of "caution". That might be especially useful with enforcing a code of conduct when you've already provided a warning and would be generally helpful with RFCs(request for comments) about any major signs of caution. |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
Clever backwards compatible syntax 👍 what about changing the colour of the block quote line to blue / yellow? if you wanted to go further, you could add a background colour as well that’s a lighter shade of the corresponding colour |
Beta Was this translation helpful? Give feedback.
-
|
How about Check for checked information? |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
Why use the blockquote element? HTML Standard says:
|
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
Hi, I like the idea but I would like to propose alternative syntax. GitHub Flavored Markdown is a superset of CommonMark and thus ideally it stays close to that if possible. The generic directives proposal for CM is already used in the ecosystem, take for instance This is how it would look: This would mean:
|
Beta Was this translation helpful? Give feedback.
-
|
Nice feature! Any way to use without blockquote though? |
Beta Was this translation helpful? Give feedback.
-
|
More customization is always nice. What if you could specify the Github's Octoicon, color, and text? For example: to render the alert octicon (https://primer.github.io/octicons/alert-16) with a hex color of
|
Beta Was this translation helpful? Give feedback.
-
|
Seems like... > **Note**
> Text...is currently rendered on the same line in readme files, instead of two separate lines like it does here in discussion comments: How it's rendered here:
How it's rendered in readme: |
Beta Was this translation helpful? Give feedback.
-
|
Instead, why not use highlight syntax for Add an letter and an extra Normal quote: |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
Would be cool if this can share the same syntax as Microsoft Docs "alerts" and Obsidian's "callouts". MS Docs format [1]: > [!NOTE]
> This is a note. Obsidian format [2]: > [!Note] Callout can have an _optional_ title
> Callouts can also be nested:
> > [!Hint]- You can also create foldable callouts with `+` or `-`
> > This is hidden until unfolded.[1]: https://docs.microsoft.com/en-us/contribute/markdown-reference#alerts-note-tip-important-caution-warning |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
This is awesome! 🚀 Would be great if we're offered more customization and standard syntax for these though. That'll allow many tools to auto support this.
|
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
This syntax might hinder with what user actually wants to write The user will expect this to be rendered as following because
Also is Others have proposed great alternatives like Microsoft Docs Here is my take on the syntax. Suggestions are welcomed. |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
@dipree can you please update the spec at https://github.github.com/gfm/ And while you're there please publish that page on GH so we can make pull requests. I don't like that I need to bookmark your discussion thread here, in addition to the documentation, to have a complete reference for writing GFM. |
Beta Was this translation helpful? Give feedback.
-
|
Love this enhancement! Thank you! |
Beta Was this translation helpful? Give feedback.
-
|
Here's some VSCode snippets to make it easier to remember: {
"Note": {
"prefix": "note",
"body": [
"> [!NOTE]",
"> $1"
],
"description": "GFM Note block"
},
"Important": {
"prefix": "important",
"body": [
"> [!IMPORTANT]",
"> $1"
],
"description": "GFM Important block"
},
"Warning": {
"prefix": "warning",
"body": [
"> [!WARNING]",
"> $1"
],
"description": "GFM Warning block"
}
} |
Beta Was this translation helpful? Give feedback.
-
|
This is amazing, this is what I'm looking for! Much better now, we call it readme highlights? |
Beta Was this translation helpful? Give feedback.
-
|
Is it me? Or this isn't working inside the Click me!
But works without the Note Test Warning Test Important Test Is GitHub cooking something disgusting again? |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
Raw (syntax highlighting also has minor issues with "```")## Update
- New types ([!TIP] and [!CAUTION] corresponding to the markdown renderer in Microsoft Learn) :rocket:
> [!TIP]
> This is a tip.
> [!CAUTION]
> This is a caution.
- MathJax expressions are now supported in alerts. :1234:
> [!NOTE]
> $\LaTeX$
- Code blocks nested in alerts can be copied now. :technologist:
> [!NOTE]
> ```
> git status
> ```
- Empty alerts are not allowed now.
> [!NOTE]<br>
- Alerts nested in blockquotes are not rendered now. :grimacing:
> This is a blockquote.
> > [!NOTE]
> > This is a note.
- Alerts nested in lists are not rendered now. :angry:
> [!NOTE]
> This is a note (broken).
- > [!NOTE]
> This is a note (broken).
- No backward compatibility :rage:
> **Note**
> This syntax is deprecated now.Update
Tip This is a tip. Caution This is a caution.
Note
Note
|
Beta Was this translation helpful? Give feedback.
-
|
a bit sad you're dropping the old |
Beta Was this translation helpful? Give feedback.
-
|
I would love to see this come to GitHub Enterprise ❤️ |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
As the initial syntax using e.g. Note isn't supported any longer after 14 November 2023. Could use remark-lint to automatically replace it with the new highlight syntax. Here is an example code snippet for the plugin: const gfmHighlightSyntaxFixs = [
{ from: 'Note', to: '[!NOTE]' },
{ from: 'Tip', to: '[!TIP]' },
{ from: 'Important', to: '[!IMPORTANT]' },
{ from: 'Warning', to: '[!WARNING]' },
{ from: 'Caution', to: '[!CAUTION]' },
];
export function remarkGfmHighlightSyntax() {
return async (tree: any) => {
const { visit } = await import('unist-util-visit');
visit(tree, 'blockquote', (node) => {
visit(node.children[0], 'strong', (subnode) => {
if (subnode.position.start.column !== 3) return;
visit(subnode, 'text', (textnode) => {
if (!['Note', 'Tip', 'Important', 'Warning', 'Caution'].includes(textnode.value)) return;
for (const item of gfmHighlightSyntaxFixs) {
if (item.from !== textnode.value) continue;
subnode.type = 'text';
subnode.value = item.to;
return;
}
});
});
});
};
}Input > **Note**\
> **Note** in paragraph will not to be replaced
---
> Will not to be replaced **Note**
> demo
---
> **Important**
>
> - a
> - bOutput > [!NOTE]\
> **Note** in paragraph will not to be replaced
---
> Will not to be replaced **Note**
> demo
---
> [!IMPORTANT]
>
> - a
> - b |
Beta Was this translation helpful? Give feedback.
-
|
The highlight stops working if it is indented (even if it is correctly identified as a quote). Code: ### Build
1. Generate project
> [!TIP]
> Change build options' values as needed |
Beta Was this translation helpful? Give feedback.
-
|
Somehow the tag like IMPORTANT aren't being aligned with the wrapped text. Here I have aligned as center. Source from my profile |
Beta Was this translation helpful? Give feedback.
-
|
Noticed that the icon isn't displayed while viewing these boxes through yout feed |
Beta Was this translation helpful? Give feedback.
-
|
Please add also a button shortcut on the WYSIWYG editor on Github. Is hard to remember this syntax. |
Beta Was this translation helpful? Give feedback.
-
|
I'm glad pleased to be here |
Beta Was this translation helpful? Give feedback.
-
|
Does not work in <details>: <details>
<summary>...</summary>
> [!NOTE]
> This does not work.
</details>...
|
Beta Was this translation helpful? Give feedback.









{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
Alerts are an extension of Markdown used to emphasize critical information. On GitHub, they are displayed with distinctive colors and icons to indicate the importance of the content.
An example of all five types:
Here is how they are displayed:
Note
Highlights information that users should take into account, even when skimming.
Tip
Optional information to help a user be more successful.
Important
Crucial information necessary for users to succeed.
Warning
Critical content demanding immediate user attention due to potential risks.
Caution
Negative potential consequences of an action.
Update - 14 November 2023
[!TIP]and[!CAUTION].**Note**isn't supported any longer.Update - 12 October 2023
Update - 28 July 2023
Thank you all once again for providing a ton of feedback. Few more changes based on that:
Update - 26 July 2023
Thanks for all the comments, we are working on a handful of fixes. One of them is to support soft line breaks in Markdown documents, so it will work the same in comments versus docs.
Update - 21 July 2023
We've made several improvements in response to your feedback:
divinstead of ablockquote.IMPORTANT.[!NOTE], has been added, which will gradually replace the old one. However, the old syntax will continue to work for some time.Thanks to all for your valuable input on this topic!
Initial - 10 May 2022
To better highlight and separate certain information from the rest in your documentation on GitHub, we now render a special and accessible note or warning blockquote in Markdown documents. We are using the existing syntax for blockquote and bold text.
This input:
Becomes:
Let us know what you think and how this helps you provide better documentation. Please note that this is a beta feature that might be subject to change.
Beta Was this translation helpful? Give feedback.
All reactions