Add support for markdown within notes & warnings (#64)

This commit is contained in:
Sidharth R 2021-10-25 19:02:09 +05:30 committed by GitHub
parent ffdb78849e
commit ae30c7d3b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -21,24 +21,24 @@ Even a happy life cannot be without a measure of darkness, and the word happy wo
```
{{</* note */>}}
This is a note! It's something the reader may like to know about but is supplementary to the main content. Use notes when something may be interesting but not critical.
This is a note! It's something the reader may like to know about but is supplementary to the main content. Use notes when something may be interesting but not critical. You can also *include* **markdown** stuffs like `code`.
{{</* /note */>}}
```
{{< note >}}
This is a note! It's something the reader may like to know about but is supplementary to the main content. Use notes when something may be interesting but not critical.
This is a note! It's something the reader may like to know about but is supplementary to the main content. Use notes when something may be interesting but not critical. You can also *include* **markdown** stuffs like `code`.
{{< /note >}}
## warning note
```
{{</* warning */>}}
This is a warning! It's about something the reader should be careful to do or to avoid doing. Use warnings when something could go wrong.
This is a warning! It's about something the reader should be careful to do or to avoid doing. Use warnings when something could go wrong. You can also *include* **markdown** stuffs like `code`.
{{</* /warning */>}}
```
{{< warning >}}
This is a warning! It's about something the reader should be careful to do or to avoid doing. Use warnings when something could go wrong.
This is a warning! It's about something the reader should be careful to do or to avoid doing. Use warnings when something could go wrong. You can also *include* **markdown** stuffs like `code`.
{{< /warning >}}
## cmd

View File

@ -3,6 +3,6 @@
<svg class="sign" aria-hidden="true" viewBox="0 0 41.667306 41.66729" focusable="false">
<use xlink:href="#info"></use>
</svg>
{{ .Inner }}
{{ .Inner | markdownify }}
</div>
</aside>

View File

@ -3,6 +3,6 @@
<svg class="sign" aria-hidden="true" viewBox="0 0 48.430474 41.646302" focusable="false">
<use xlink:href="#warning"></use>
</svg>
{{ .Inner }}
{{ .Inner | markdownify }}
</div>
</aside>