diff --git a/app/Classes/MarkdownManager.php b/app/Classes/MarkdownManager.php index 091ffdb..6b90a71 100644 --- a/app/Classes/MarkdownManager.php +++ b/app/Classes/MarkdownManager.php @@ -93,11 +93,13 @@ public function isDirty(): bool */ public function lint(): void { - $linter = new Linter($this->content ?? ''); + if (!empty($this->content)) { + $linter = new Linter($this->content); - $this->content = $linter->format(); + $this->content = $linter->format(); - $this->save(); + $this->save(); + } } /**