Liquid Exception: Variable '{{ {0}' was not properly terminated with regexp: /\}\}/ in #466

Closed
huobazi opened this Issue Mar 4, 2012 · 7 comments

Projects

None yet

7 participants

@huobazi
huobazi commented Mar 4, 2012

Liquid Exception: Variable '{{document.forms[0].__SCROLLPOS_TOP.value = {0}' was not properly terminated with regexp: /}}/ in 2004-09-20-scrollpage.markdown
Liquid Exception: Variable '{{ {0}' was not properly terminated with regexp: /}}/ in 2007-08-05-advertisementlazyloadingcontrol.markdown
Liquid Exception: Variable '{{ {0}' was not properly terminated with regexp: /}}/ in atom.xml
Liquid Exception: Variable '{{ {0}' was not properly terminated with regexp: /}}/ in atom.xml

the mk file:

https://gist.github.com/1970621

@scmbradley

I get the same Liquid Exception: Tag '{%' was not properly terminated with regexp: /\%\}/ in atom.xml error. I downloaded octopress a couple of weeks ago. (The main branch).

@luoluo
luoluo commented Jun 4, 2012

So did i.I wonder have you solved it?

@imathis imathis added a commit that closed this issue Jun 11, 2012
@imathis Added escape for liquid tags {{ and {% so that Liquid doesn't barf wh…
…en a language uses these characters. Closes #466
0ce6655
@imathis imathis closed this in 0ce6655 Jun 11, 2012
@imathis
Owner
imathis commented Jun 11, 2012

This is an issue with Liquid using the {{ character to represent opening a liquid tag. You need to escape them by using html characters { instead of the curly braces. I've handled the replacement for back tick code blocks, but due to the way Liquid works, I can't fix this for {% codeblocks %}.

@luoluo
luoluo commented Jun 11, 2012

I tried to diff all the files in /octopress and /octopress.bk.
In the end, I find that i had used wrong grammars in the *.markdown.

I wrote\{\{\{ \}\}\}, which lead to the problem. Now I solved it.

@imathis imathis added a commit that referenced this issue Sep 6, 2012
@imathis Added escape for liquid tags {{ and {% so that Liquid doesn't barf wh…
…en a language uses these characters. Closes #466
f3978d1
@ustcscgy

This bug happens in other places. I use pandoc markdown, in latex math expressions, such as "${{b} ^ {2}}$", then liquid throw this error.

I hack this by replace "{{" with "{ {" ...

@samselikoff

You can also use {% raw %} {{some-text}} {% endraw %}

@maye696
maye696 commented Jul 31, 2014

samselikoff Thank you, you solved my problem.

@decvalts decvalts added a commit to LSDtopotools/LSDCodingBlog that referenced this issue Sep 21, 2015
@decvalts decvalts Tried to fix the 'page build error'
It's to do with the way markup/liquid interprets {{ (i.e. it thinks i'm trying to give it a command or something, when I just want the literal characters) see:

imathis/octopress#466
54ee0e2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment