hugo-hyperskip

Email-powered static comments for Hugo

git clone git://git.shimmy1996.com/hugo-hyperskip.git
commit d192a98b4ed275820ea6208a7530c474c5cc5cc6
parent 7e3311b57b53c0bcfd539e51630e1ab2ac56eeaf
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Thu, 27 Feb 2020 22:52:39 -0600

Enclose singleline comments in <p>

Diffstat:
Mlayouts/partials/list_comment.html | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/layouts/partials/list_comment.html b/layouts/partials/list_comment.html
@@ -25,7 +25,9 @@
         {{- end -}}
     </p></nav>
   </header>
-  {{ .content | htmlEscape | markdownify }}
+  {{- with (.content | htmlEscape | markdownify) }}
+  {{ if not ( findRE "<[h|p][^>]*>" . ) }}<p>{{ . }}</p>{{ else }}{{ . }}{{ end }}
+  {{ end -}}
 </article>
 {{ end }}
 {{ else }}