save the file even if tick fence wasn't closed properly

This commit is contained in:
Paul Gauthier 2023-06-24 14:47:29 -07:00
parent eaf02da46b
commit 82e19fcf1d

View file

@ -101,9 +101,10 @@ class WholeFileCoder(Coder):
return "\n".join(output) return "\n".join(output)
# TODO: take the file even it wasn't closed properly? if fname and allowed_to_edit:
# edited.add(fname)
# if fname: if not self.dry_run:
# raise ValueError("Started a ``` block without closing it") new_lines = "".join(new_lines)
Path(full_path).write_text(new_lines)
return edited return edited