DESCRIPTION
Medium's array based markup requires the view layer to peek into the
next element to terminate the previous element's formatting rules.
So a <ul> element's termination is specified by the appearance of an
element that isn't a <ul>. This patch maintains state and lazily
applies formatting rules when termination is detected.