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

Issue with Jekyll liquid templates and raw tags #737

Closed
cfjedimaster opened this issue Oct 18, 2019 · 4 comments
Closed

Issue with Jekyll liquid templates and raw tags #737

cfjedimaster opened this issue Oct 18, 2019 · 4 comments
Labels
needs-test-case Please submit a reproducible test case showcasing the issue! needs-triage

Comments

@cfjedimaster
Copy link

Describe the bug
I copied some posts I had written for my Jekyll blog and noticed that Eleventy's liquid parser did not like this:

{% raw %}
stuff
{% endraw %}

I use this when I blog about Vue and need to have it ignore Vue-related stuff for my post. When I ran Eleventy, it told me that the raw tag wasn't closed. Is this something I can configure Eleventy's Liquid to understand or some mistake on my part?

Note - I wasn't using foo.liquid but foo.md.

To Reproduce
Try to use unparsed Liquid code in a Markdown file by using raw/endraw wrappers.

Expected behavior
Liquid should not parse the code between them.

@zachleat
Copy link
Member

Hmm both of these pass in our tests:

image

Can you provide a more detailed reduced test case? What’s your markdown template language?

@zachleat zachleat added the needs-test-case Please submit a reproducible test case showcasing the issue! label Nov 15, 2019
@cfjedimaster
Copy link
Author

Well shoot, now I can't reproduce it. Maybe a gremlin or something else?

@cfjedimaster
Copy link
Author

FYI I just reproduced it - but I'm boarding a plane for hours. My first test (today) was with a few of my blog posts. I just tried with all 9k of my blog posts and reproduced it. I'll narrow it down later today.

@cfjedimaster
Copy link
Author

Ahah, I figured it out. It was not with a simple {% raw %} stuff {% endraw %} template as I thought. It was an earlier syntax I used on my blog and SUPER weird which is why I was so happy when I found the 'proper' way to escape. Anyway, this is what I was doing, it works on my blog (Jekyll), not Eleventy, which is fine.

      {% raw %}{{phone.name}{% endraw %}}

Note the weird closing brackets. It looks and feels wrong, but I swear this worked. Anyway, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-test-case Please submit a reproducible test case showcasing the issue! needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants