Skip to content

Commit 3530e6d

Browse files
committed
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.
1 parent 9965cc2 commit 3530e6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layouts/shortcodes/note.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<blockquote class="note">
2-
<div><strong>{{ T "note" }}</strong> {{ trim .Inner " \n" | markdownify }}</div>
2+
<div><strong>{{ T "note" }}</strong> {{ replaceRE "\\s+|\n" " " .Inner | markdownify }}</div>
33
</blockquote>

0 commit comments

Comments
 (0)