-
-
Notifications
You must be signed in to change notification settings - Fork 471
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
Using a for loop in Liquid renders content in <code><pre>... </pre></code> wrapper #1285
Comments
I don't think we can we can triage the issue without a little bit more of your code. |
This is the layout of things:
The new-tutorial.md is using the tutorial.liquid for its general rendering. Occasionally, mixed with the markdown, I'll make a call to a partial so that I can include a design pattern and pass some parameters. So, the markdown looks something like this...
The card.liquid has something simple like:
Rather than the for loop rendering HTML, it ends up wrapping all that content in a pre and code tag, which I can't seem to disable. Hopefully that provides some additional context. |
Yes, that's 99% where your There are two phases for rendering your markdown:
After the first pass your markdown file looks like this: ---
front-matter: "a setting"
---
# header here
Some text and **something bold** is happening.
<div class="card-element">
<span class="tags">
<span class="demo-tag"> list </span> <span class="demo-tag"> of </span> <span class="demo-tag"> stuff </span>...
</span>
</div>
## Additional stuff... See those at least 4 spaces before that Exactly this line will be parsed as a The thing is, if there wasn't an empty line before that One way to solve this would be to strip the resulting whitespace around {%- assign t = tags | split: ", " -%} |
Apologies, I thought I had replied directly after you posted. This information was very helpful, thank you! |
I think this is another Indented Code Blocks victim https://www.11ty.dev/docs/languages/markdown/#indented-code-blocks The default behavior changed in 2.0: #2438 |
Describe the bug
I'm passing in the property "tags" as a comma separated list into a liquid partial. Inside the partial, I'm breaking that into an array using a technique noted in the docs.
When this is rendered, it wraps that for loop in a code and pre tag wrapper.
Expected behavior
Is there a way to prevent that wrapper and cleanly write the HTML in?
The text was updated successfully, but these errors were encountered: