facebook/react — pull request #263 by benjamn (2013-08-13 19:15:14+00:00)
Title: Improve error behavior of Danger.dangerouslyRenderMarkup

This is a less ambitious version of https://github.com/facebook/react/pull/246, which I will close shortly.

HTML comment nodes are now interspersed in the original markup list so that we can tell which chunks of markup rendered as more or less than one node, and give a more helpful error message in that case.

Regardless of how many nodes were rendered, we only take the first one. If zero nodes were rendered, then `resultList` will contain `null` at the corresponding position.

If we decide to revisit the idea of using document fragments, it will be very easy to handle the `!== 1` case by returning a document fragment.

cc @yungsters @zpao