Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.njk or .html includes in .md would have empty lines processed as <p> inside html areas #3528

Open
terpimost opened this issue Nov 4, 2024 · 1 comment

Comments

@terpimost
Copy link

Operating system

linux

Eleventy

3

Describe the bug

I have .md file inside of which I have an include:

{% include 'promo.html' %}

my promo.html content would be something like:

<div>
<h4>My promo</h4>
<script>
function(){
//empty line here makes elevent paste <p>

//some other thing
}
</script>
</div>

I thought markdown shouldn't process html sections, am I wrong?
I do use custom markdown It instance and have:

    const options = {
        html: true,
        typographer: true,
        linkify: true,
    };

and my eleventy config sets template language like this:

return {
        markdownTemplateEngine: "njk",
        htmlTemplateEngine: "njk",
    }

Reproduction steps

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See an error

Expected behavior

No response

Reproduction URL

No response

Screenshots

No response

@terpimost
Copy link
Author

It feels like doesn't matter the extension of my include it is processed as .md file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant