gitbook-plugin-image-captions icon indicating copy to clipboard operation
gitbook-plugin-image-captions copied to clipboard

Image captions are not applied to images within {% if %} statements

Open cdrfun opened this issue 8 years ago • 1 comments

Using the current gitbook and gitbook-plugin-image-captions images within version {% if %} seem to be ignored. I didn't try other Templating features, but I gues they won't work either. If needed I can supply a demo gitbook, but it make take some time to prepare ;)

cdrfun avatar Apr 12 '17 08:04 cdrfun

I've found a workaround: Instead of writing

{% if book.projectName == "One" %}
  ![One](assets/one.png)
{% elif book.projectName == "Two" %}
  ![Two](assets/two.png)
{% endif %}

This one works:

{% if book.projectName == "One" %}

![One](assets/one.png)

{% elif book.projectName == "Two" %}

![Two](assets/two.png)

{% endif %}

I can't judge of this is intended or not, but for me the first example should work too.

cdrfun avatar Apr 12 '17 11:04 cdrfun