Closed ratijas closed 2 years ago
ping @FichteFoll
Sorry for the delay. I took a very brief look but haven't found the time to finish up a release where this would then be included (I already added the milestone of the next version). I don't want to make promises, but I have some free time on Thursday where I hope to finally get to PD again.
take your time :)
Thanks, works really well and pretty-printing is a good idea, especially since we already insert the content in a new line.
(Sorry again for the delay.)
Edit: re-added commit message via bfa509b49593e930371abdfd9a873d0586d5d96e.
The root cause was that text manipulation was reordered in a wrong way: JSON-encoded string was converted to snippet-field-content-encoded string first, but then it was treated as a simply JSON-encoded string again. Namely, stripping curly brackets away after encoding them as \} broke cursor things in a weird ways.
Used pretty printing just because it looks better. But it required extra whitespace stripping: both outside and inside stripped brackets/braces.
Also changed variable name from
encoded
tocontent
in fmt, so they can never be accidentally reordered again.Fixes #347