markdown-xwidget icon indicating copy to clipboard operation
markdown-xwidget copied to clipboard

Render GitHub note/warning blocks

Open cfclrk opened this issue 2 years ago • 0 comments

GitHub recognizes a special blockquote syntax for notes and warnings, as discussed here: https://github.com/community/community/discussions/16925.

Example:

> **Warning**
> It's important to specify the `:files` directive! Without it, the non-elisp
> files (CSS and HTML) won't be copied to the right place.

Renders as:

Warning It's important to specify the :files directive! Without it, the non-elisp files (CSS and HTML) won't be copied to the right place.

Should markdown-xwidget do the same? And how does GitHub do that?


EDIT: Some more info:

<blockquote>
<p dir="auto">
<span class="color-fg-attention">
  <svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
    <path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z">
    </path>
  </svg>Warning
</span>
<br>
It's important to specify the
<code class="notranslate">:files
</code> directive! Without it, the non-elisp
<br>
files (CSS and HTML) won't be copied to the right place.
</p>
</blockquote>

cfclrk avatar Oct 20 '22 09:10 cfclrk