# Prevent Markdownify to strip first p tags

**URL:** <https://discourse.gohugo.io/t/prevent-markdownify-to-strip-first-p-tags/7854>\
**Category:** support\
**Created:** [August 8, 2017, 9:45am UTC](https://discourse.gohugo.io/t/prevent-markdownify-to-strip-first-p-tags/7854 "2017-08-08T09:45:42Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Grob](https://avatars.discourse-cdn.com/v4/letter/g/f14d63/32.png) [@Grob](https://discourse.gohugo.io/u/Grob)\
**Post date:** [September 22, 2019, 6:09am UTC](https://discourse.gohugo.io/t/prevent-markdownify-to-strip-first-p-tags/7854/11 "2019-09-22T06:09:39Z")

</div>

This is what I use in quite many layout files and shortcodes:

```auto
{{ if in (string .Inner) "\n\n" }}
  {{ .Inner | markdownify }}
{{ else }}
  <p>{{ .Inner | markdownify }}</p>
{{ end }}

```

---

_[View the full topic](https://discourse.gohugo.io/t/prevent-markdownify-to-strip-first-p-tags/7854)._
