简体   繁体   中英

Escaping character sequences with Jekyll and Liquid

I'm currently trying to add the following character sequence to a post using Jekyll:

#\^[]|{}~

However, whenever I try, I get the error:

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

I've seen multiple posts on this suggesting that I do the following:

#\^[]|{{ "{}" }}~

This results in a similar error:

Liquid Exception: Variable '{{ "{}' was not properly terminated with regexp: /\}\}/ 

Where am I going wrong?

You can temporarily disable Liquid parsing by doing:

{% raw %}
  #\^[]|{}~
{% endraw %}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM