0

I am using trouble with {{ and }} while using markdown. The code that I am trying to get into my Octopress blog looks like this:

<ul id="books">
  <template iterate="book in books">
    <x-book-item book="{{ book }}"></x-book-item>
  </template>
</ul>

Except, when it is rendered, the line with the {{ }} becomes:

<x-book-item book=""></x-book-item>

If I change my code to this:

<x-book-item book="\{\{ book \}\}"></x-book-item>

it renders with as

<x-book-item book="\{\{ book \}\}"></x-book-item>

I.e., it includes the the \ and {.

Any ideas what I should do?

Shailen Tuli
  • 13,815
  • 5
  • 40
  • 51

1 Answers1

0

Finally figured it out. I need to use the raw tag here, and that takes care of things nicely.

{% raw %}<x-book-item book="{{ book }}"></x-book-item>{% endraw %}

produces this on the web page:

<x-book-item book="{{ book }}"></x-book-item>
Shailen Tuli
  • 13,815
  • 5
  • 40
  • 51