Skip to content

v0.10.3

Compare
Choose a tag to compare
@daveshanley daveshanley released this 14 Sep 11:34
· 617 commits to main since this release

Added Render method to document

Previously RenderAndReload was the only way to print out the document as a byte slice, and then have a new model created from that rendered document.

A use-case has appeared, where a non-destructive approach is required for high-level use where a render is needed, but any manipulation of the model will cause issues.

So a new Render method has been added, that does everything RenderAndReload does, except it does not reload.

WARNING

The high and low level models will remain out of sync after rendering. This is totally fine if you don't use the low level model, but if you do, then remember that the render is of the mutated high-level and the low-level will not match, it will reference the original document, before mutation.