Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Mar 19, 2013
Merged

Conversation

scorphus
Copy link
Contributor

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
Copy link
Contributor Author

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
data-view-id being rendered in tag closing
@daffl daffl merged commit c5e1ba2 into canjs:master Mar 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants