Laika icon indicating copy to clipboard operation
Laika copied to clipboard

Render as reStructuredText

Open sbrunk opened this issue 11 years ago • 1 comments

Is it possible to write a Document Tree Model back to reStructuredText somehow? Could it even be possible to do it "lossless", that is, recreate the exact original document from the tree model? Use case would be an editor that changes a few elements programmatically but stores back reStructuredText.

sbrunk avatar May 06 '14 12:05 sbrunk

Writing back in markup format is currently not possible. I had it on the back of my mind, but it's not on the road map yet. But when I thought of it I was thinking more about cross-transforming from one format to the other. Making it lossless is not trivial, the current model would not be sufficient as each node would need to store the original input string. The current model only does that for a few selected node types like link references where it is quite common to write back the source to the target format when they cannot be resolved.

jenshalm avatar May 07 '14 20:05 jenshalm