Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
markdownify for getting consistent results when you need a p tag on a single paragraph
{{- $markdown := .Inner | markdownify -}}
{{ if not ( findRE "<[h|p][^>]*>" $markdown ) }}
<p>{{ $markdown }}</p>
{{ else }}
{{ $markdown }}
{{ end }}

This comment has been minimized.

Copy link
Owner Author

@ryanburnette ryanburnette commented Aug 16, 2020

todo convert this to a shortcode or something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.