visionmedia/jade — pull request #971 by jpdutoit (2013-04-18 20:45:33+00:00)
Title: Stop nested jade renders from clobbering each other.

Commit ef156a85bc8 has the side-effect of sharing the runtime variable between nested render calls.

This leads to the exception 'Cannot read property 'filename' of undefined" when one jade render is executed from within another. Before commit ef156a85bc8 this used to work. I assume this happens because the inner render clobbers the debug info for the outer render.

The quickest fix I could come up with is to give each template it's own 'runtime' object to store debug variables in. Maybe there is a better solution?