retaining code folding

fixes #110  retaining code folding after prettifying. however if the folded code has changed on prettifying, folding will be lost