class RuboCop::Markdown::Preprocess

def restore_and_save!(file)

We have to restore it.

using preproccessed source buffer.
When autocorrect is applied, RuboCop re-writes the file

Revert preprocess changes.
def restore_and_save!(file)
  contents = File.read(file)
  restore!(contents)
  File.write(file, contents)
end