ect icon indicating copy to clipboard operation
ect copied to clipboard

Redefined blocks now actually work as expected

Open nfour opened this issue 10 years ago • 3 comments

Fixes #79. I'm not 100% sure that this doesn't break anything but from my tests it seems to be fine. Would be great if someone who knows ECT could make this more elegant.

Basically makes this work as you would expect:

base.ect

<< block 'image' : >>
  <img src="111.png" />
<< end >>
<< include 'imageBox' >>
<< block 'image' : >>
  <img src="222.png" />
<< end >>
<< include 'imageBox' >>

imageBox.ect

<div class="imageBox">
  << content 'image' >>
</div>

The above example previously would compile both << include 'imageBox' >> to only the first block content ( `111.png ).

I'd imagine something like this could be used to make #50 work as well without too much pain.

nfour avatar Jul 26 '14 10:07 nfour

This appears to fix #83 but without a test suite it's impossible to know the impact of these changes.

paulyoung avatar Aug 20 '14 14:08 paulyoung

@baryshev could you take a look at this please?

paulyoung avatar Aug 20 '14 14:08 paulyoung

Been using this in production for a few weeks now and I'm not seeing any problems, but, a test suite would be pretty nice.

nfour avatar Aug 21 '14 07:08 nfour