data-view-id being rendered in tag closing #317

Merged
merged 1 commit into from Mar 19, 2013

Conversation

Projects
None yet
2 participants
@scorphus
Contributor

scorphus commented Mar 15, 2013

The scanner wrongly adds data-view-id='X' to a tag close </TAGNAME>.

In EJS, for example, if you have:

<textarea>
  <select>
    <% can.each(this.items, function(item) { %>
      <option <%= (el) -> el.data('item', item) %>>
        <%= item.title %>
      </option>
    <% }) %>
  </select>
<textarea>

it gets wrongly rendered:

<textarea>
  <select>

      <option  data-view-id='3'>
        One
      </option>

      <option  data-view-id='4'>
        Two
      </option>

  </select data-view-id='5'>
</textarea>

It goes the same with Mustache. The bug can be seen in this fiddle. And the fix is available in this fiddle.

scorphus added a commit to scorphus/canjs that referenced this pull request Mar 15, 2013

@scorphus

This comment has been minimized.

Show comment
Hide comment
@scorphus

scorphus Mar 18, 2013

Contributor

I've made use of valid HTML in test cases, pull request description and fiddles. Just to make it right.

Contributor

scorphus commented Mar 18, 2013

I've made use of valid HTML in test cases, pull request description and fiddles. Just to make it right.

daffl added a commit that referenced this pull request Mar 19, 2013

Merge pull request #317 from scorphus/popTagName
data-view-id being rendered in tag closing

@daffl daffl merged commit c5e1ba2 into canjs:master Mar 19, 2013

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment