kolber/stacey — Issue #27: having a problem with "if !@thumb do..." 
Author: adriencater
Created: 2011-11-28 10:17:16+00:00
State: open

I'm having a strange problem with the language:

if !@thumb do

Is not working properly

I want to test if projects have @thumbs; and if they do, show them, if they don't, generate them from the first image in the project (using a thumber.php script.)

if @thumb do
stuff...
endif

if !@thumb do
other stuff...
endif

The "if @thumb do" works fine, as expected.

The ! block fails to parse when there *is* a thumb present: stacey outputs

if !./content/01.projects/01.My-Project/thumb.jpg do

into the HTML stream. On pages where there is *no* thumb present, the ! operator works fine.

original snippet:

if !@thumb do

foreach $images[:1] do

endforeach

endif