zephraph / nunjucks-markdown

Markdown extension for Nunjucks. Use your own renderer!
MIT License
49 stars 12 forks source link

Incorrectly treating HTML inside a MD file as indented #27

Open adamsilver opened 6 years ago

adamsilver commented 6 years ago

As per subject, the HTML from within the MD file is recognised as indented, even though it isn't.

When the view renders, it renders as a code block.

Markdown file:

A paragraph

<div class="adam">Boom</div>

Nunjucks file:

{% markdown %}{% include "./README.md" %}{% endmarkdown %}

The paragraph is correctly marked up as such. But the HTML (<div class="adam">) is converted into code (HTML source below):

<p>Here&#39;s where the timeline readme goes.</p>
<p>&lt;div class=&quot;adam&quot;&gt;Boom&lt;/div&gt;
</p>