+\r
+ // Preserve heading structure when converting to list item. (#5271)\r
+ if ( headerTagRegex.test( contentBlock.getName() ) )\r
+ contentBlock.appendTo( listItem );\r
+ else\r
+ {\r
+ contentBlock.copyAttributes( listItem );\r
+ contentBlock.moveChildren( listItem );\r
+ contentBlock.remove();\r
+ }\r
+\r