# Split at paragraph boundaries leaves empty paragraphs before/after

**URL:** <https://discuss.prosemirror.net/t/split-at-paragraph-boundaries-leaves-empty-paragraphs-before-after/2358>\
**Category:** Uncategorized\
**Created:** [November 19, 2019, 2:12pm UTC](https://discuss.prosemirror.net/t/split-at-paragraph-boundaries-leaves-empty-paragraphs-before-after/2358 "2019-11-19T14:12:13Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [November 19, 2019, 3:17pm UTC](https://discuss.prosemirror.net/t/split-at-paragraph-boundaries-leaves-empty-paragraphs-before-after/2358/4 "2019-11-19T15:17:38Z")

</div>

> [@Javarome](#):
>
> Yes I’m using `Transform.split` . I don’t think I could avoid splitting in such edge cases because:
> 
> - when the position is at the start I still want to split at the end of the selection
> - when the position is at the end I still want to split at the beginning of the selection.

I do not see how this is a problem. Your code can check for these cases and do the appropriate amount of splitting.

---

_[View the full topic](https://discuss.prosemirror.net/t/split-at-paragraph-boundaries-leaves-empty-paragraphs-before-after/2358)._
