Reputation: 583
I have some markdown in Morea which includes an example Jinja2 template. It looks like this:
{% highlight html linenos %}
<!doctype html>
<html>
<body>
<p> {{ greet }}, {{ place }} </p>
</body>
</html>
{% endhighlight %}
I would like to be able to display the double curly braces, but they get swallowed up, displaying nothing but the paragraph tags and the comma, like this:
<p> , </p>
I followed some advice to use the {% raw %} and {% endraw %} tags around that line, but nothing changes. Seems like a bug. Anyone have any tricks?
Upvotes: 0
Views: 1516
Reputation: 52829
Surround code containing curly braces with the raw
tag :
{% highlight html linenos %}
{% raw %}
<!doctype html>
<html>
<body>
<p> {{ greet }}, {{ place }} </p>
</body>
</html>
{% endraw %}
{% endhighlight %}
Upvotes: 1
Reputation: 1
This should work :
```
{% raw %}
<!doctype html>
<html>
<body>
<p> {{ greet }}, {{ place }} </p>
</body>
</html>
{% endraw %}
```
Upvotes: 0
Reputation: 1575
Eek. There appears to be some double-escaping going on with the Morea plugin. The only solution I can come up with quickly is to embed a gist with the code containing the offending liquid tag. Here is a sample page illustrating this approach:
I will continue to look into this. Note that to embed gists you'll need to install the jekyll-gist gem and then add the following to your config.yml:
gems:
- jekyll-gist
Upvotes: 0