Using regex to allow rendering notes with an indent, for example:

{{< note >}}
If the last element of the path is a substring of the
last element in request path, it is not a match (for example:
`/foo/bar` matches`/foo/bar/baz`, but does not match `/foo/barbaz`).
{{< /note >}}

After changin to hugo 0.70 trim seems to be not working.
pull/20946/head
Irvi Firqotul Aini 2020-05-13 21:50:31 +07:00
parent 9965cc28aa
commit 3530e6d6d0
1 changed files with 1 additions and 1 deletions

View File

@ -1,3 +1,3 @@
<blockquote class="note">
<div><strong>{{ T "note" }}</strong> {{ trim .Inner " \n" | markdownify }}</div>
<div><strong>{{ T "note" }}</strong> {{ replaceRE "\\s+|\n" " " .Inner | markdownify }}</div>
</blockquote>