Gary Rowe Gary Rowe - 2 months ago 12
Ruby Question

How to fix: Liquid Exception: Tag '{%' was not properly terminated with regexp: /\%\}/?

I'm getting this output from my Jekyll website generator


Liquid Exception: Tag '{%' was not properly terminated with regexp: /\%}/


What's going on?

Answer

It turns out that you've probably made a formatting error in your template. For example:

{% if site.ALERT 
or site.ALERT_en %}

will break but

{% if site.ALERT or site.ALERT_en %}

is fine.

Comments