Skip to content

Commit

Permalink
Fix (temporary): remove duplicate code and pre tags in html output
Browse files Browse the repository at this point in the history
  • Loading branch information
awcodes committed Sep 10, 2024
1 parent 6651de1 commit 907e652
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/TiptapConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ public function asHTML(string | array $content, bool $toc = false, int $maxDepth
$this->parseMergeTags($editor);
}

return $editor->getHTML();
/*
* Temporary fix for Tiptap Serializer bug duplicating code block tags
*/
return str_replace('</code></pre></code></pre>', '</code></pre>', $editor->getHTML());
}

public function asJSON(string | array $content, bool $decoded = false, bool $toc = false, int $maxDepth = 3): string | array
Expand Down

0 comments on commit 907e652

Please sign in to comment.