tildeio/htmlbars — pull request #90 by mixonic (2014-09-11 18:19:57+00:00)
Title: parseHTML disregards browser generated omitted start tags

The HTML spec allows for "omitted start tags". These tags are optional when their intended child is the first thing in the parent tag. For example, this is a tbody start tag:

```

```

The tbody may be omitted, and the browser will accept and render:

```

```

However, the omitted start tag will still be added to the DOM. We now test the string and context to see if the browser is about to perform this cleanup.

http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#optional-tags

describes which tags are omittable. The spec for tbody and colgroup explains this behavior:

http://www.whatwg.org/specs/web-apps/current-work/multipage/tables.html#the-tbody-element
http://www.whatwg.org/specs/web-apps/current-work/multipage/tables.html#the-colgroup-element

With aid from @bantic. tl;dr the spec will show you the way.

Replaces #89