angular/angular.js — pull request #1487 by jamesreggio (2012-10-23 20:20:40+00:00)
Title: Fix $compile corner-case in IE7/8

IE7/8 inserts an empty text node between inline elements adjacent to
block elements; for example, `

` will have an empty
text node between `` and `

`. These implicit nodes can appear
after the directive compilation phase; specifically, when a directive
replaces itself with a top-level inline element.

The appearance of implicit elements breaks the correlation between
nodeList and nodeLinkFn within compositeLinkFn, causing unpredictable
behavior. This commit adds a sentinel for every empty text node
encountered during compilation, and then skips any such node during
linking unless the corresponding sentinel is set.