0

I'm working on jekyll (the static blogging engine) and a stubleupon some problems with the highlight template tag.

It's working for most of the cases but with django templates tag (with {{ or {% syntax ) it does not work, it just remove the line where are the templates tag.

For example, try this code in a jekyll post.

{% highlight html+django linenos %}
<form action="#" method="post">
    <ul>
        {% for error in form.name.errors %}
            <li>{{ error.0 }}</li>
        {% endfor %}
    </ul>
    <input type="text" name="name" value="{{ form.name.data }}" />

    <input type="submit" />
</form>
{% endhighlight %}

An answer will be to use HTML Entities of {, } and % but it's not very easy :)

Does anyone has an idea to fix this problem ?

Thanks a lot

Clément

Dator
  • 3
  • 2
  • possible duplicate of [How to escape liquid template tags?](http://stackoverflow.com/questions/3426182/how-to-escape-liquid-template-tags) – Aylen Apr 09 '15 at 19:36

1 Answers1

0

There is another way, but it is equally infuriating: it involves lots of quotes.

Appart from that, you are out of luck; Jekyll can't "escape" liquid.

kikito
  • 51,734
  • 32
  • 149
  • 189