Jekyll Markdownify Generates Unexpected P Tag

13 Aug 2019- Zhiqiang Zang


Problem

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>' }}.

https://github.com/jekyll/jekyll/issues/3571


LICENSE:

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