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

handle implicitly closed elements #318

Merged
merged 1 commit into from
Mar 1, 2017
Merged

Conversation

Rich-Harris
Copy link
Member

Starting to dig into #258 and #224 and related issues. As a starting point, Svelte needs to do a better job of handling situations like these:

<!-- the <p> is never closed, but that's totally fine in HTML -->
<div><p>some text</div>

<!-- these <li> elements don't need closing tags -->
<ul>
  <li>a
  <li>b
  <li>c
</ul>

This PR addresses both cases, by noting which elements are forbidden from containing which other elements, and by closing all currently open elements until the one that corresponds to a particular closing tag

@Rich-Harris Rich-Harris merged commit c2275f3 into master Mar 1, 2017
@Rich-Harris Rich-Harris deleted the implicitly-closed-elements branch March 1, 2017 21:17
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.

1 participant