evilstreak/markdown-js — pull request #216 by Sneakertack (2014-09-19 14:13:38+00:00)
Title: renderJsonML mutates its argument

Upon running a JsonML tree through `markdown.renderJsonML` the tree gets trimmed down into nothingness. This means that the following code will not work as expected:

```js
// Assume we already have a JsonML tree myTree.
doSomeProcessingOn(myTree);
var intermediate = markdown.renderJsonML(myTree);
doSomeOtherProcessingOn(myTree);
var finished = markdown.renderJsonML(myTree);
```

`finished` ends up being empty.

This pull request fixes the issue by doing a clone at the start of renderJsonML.