bitovi/canjs — pull request #387 by andykant (2013-05-13 14:56:34+00:00)
Title: Adds support for EJS shared blocks

Transforms the EJS template to add support for shared blocks. Essentially, this breaks up EJS tags into multiple EJS tags if they contained unmatched brackets.

These types of templates previously worked prior to adding live binding support to EJS. It also isn't obvious that they shouldn't work and can cause issues if you don't know about this quirk.

For example, this doesn't work:

```javascript
<% if (1) { %>
<% if (1) { %>
hi
<% }
} %>
```

...without isolated EJS blocks:

```javascript
<% if (1) { %>
<% if (1) { %>
hi
<% } %>
<% } %>
```

The result of transforming:

```javascript
<% if (1) { %><% %>
<% if (1) { %><% %>
hi
<% %><% } %>
<% } %>