sagemath/sagecell — pull request #388 by ihanson (2013-02-16 03:09:01+00:00)
Title: don't make a Sage cell if it has already been made

On https://plus.google.com/u/0/111272571205985168793/posts/5aM83AYhxgS, we're seeing a problem where makeSagecell is being called on the same div twice (I think that's what is happening). The first time, the div is made into a Sage cell, and the second time, it takes the sage cell html as the default code!

We should be smarter when making a Sage cell and check first to see if we've already made the div into a cell. A quick check would be just checking to see if the div already has the class "sagecell".