Update Markdownify.md

This commit is contained in:
Joe Mooring 2023-11-11 20:55:58 -08:00 committed by GitHub
parent 0c4bc14477
commit c9d0dc8fb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,15 +14,13 @@ aliases: [/functions/markdownify]
--- ---
```go-html-template ```go-html-template
{{ .Title | markdownify }} <h2>{{ .Title | markdownify }}</h2>
``` ```
If the resulting HTML is a single paragraph, Hugo removes the wrapping `p` tags to produce inline HTML as required per the example above. If the resulting HTML is a single paragraph, Hugo removes the wrapping `p` tags to produce inline HTML as required per the example above.
To keep the wrapping `p` tags for a single paragraph, use the [`RenderString`] method on the `Page` object, setting the `display` option to `block`. To keep the wrapping `p` tags for a single paragraph, use the [`RenderString`] method on the `Page` object, setting the `display` option to `block`.
If the resulting HTML is two or more paragraphs, Hugo leaves the wrapping `p` tags in place.
[`RenderString`]: /methods/page/renderstring/ [`RenderString`]: /methods/page/renderstring/
{{% note %}} {{% note %}}