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:
// 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.
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:finished
ends up being empty.This pull request fixes the issue by doing a clone at the start of renderJsonML.