xwiki-contrib/wiki30 — comment on commit 7be796482bb2b41d877cba2cd37a894effee37ca
File: wiki30-realtime-wysiwyg-plugin/src/main/java/org/xwiki/gwt/wysiwyg/client/plugin/rt/dom/operation/DomInsertParagraph.java line 62
By mflorea:

I believe the TODO is wrong. The next sibling is always an element in this case because it's a 'copy' of the container (not a deep one, just the same tag with almost the same attributes) created by splitting the container in two.

If the container is a paragraph then the next sibling (the 'copy') is also a paragraph. The reason I'm replacing a paragraph with another paragraph is just to keep the code generic like in Line plugin: the same code will work for instance if the container is a heading (pressing Enter in a heading generates a new paragraph).