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

Conversation

Projects
None yet
2 participants
@scorphus
Copy link
Contributor

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.

Copy link
Contributor Author

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
You can’t perform that action at this time.