Jekyll Markdownify Generates Unexpected P Tag

13 Aug 2019- Zhiqiang Zang


Jekyll’s markdownify filter generates unexpected <p></p> tag, e.g.,

{% assign text = "hello" %}
{{ text | markdownify }}

We expect to see hello but jekyll ends with <p>hello</p>.

Brutal Solution

Use {{ text | markdownify | remove: '<p>' | remove: '</p>' }}.


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.