When a page with blocks of pre-formatted text that use the leading space in wikitaxt is edited in Visual Editor there are various issues trying to remove the pre-formatted blocks. https://en.wikipedia.org/w/index.php?title=User:Thryduulf/sandbox&oldid=565085889 can be used for testing.
- It is not possible to delete a block on the first line of a page
- When the pre-formatted block follows a mutli-line template, that template is deleted and the contents of the pre-formatted block becomes normal text on the line above where the template as, appended to any text that was already there.
- When the pre-formatted block follows a normal line of text or a single line template the contents of the block are appended to the end of that line.
- When the block follows indented text, the contents are appended to the last line of the indented block, even if that is a line that doesn't exist in wikitext (see bug 50995)
- When the block follows an ordered or unordered list, the text is appended to the last line of the last item in the list
*When the block follows an image, the contents are appended to the image caption. This is probably depends on bug 51624 and so I would expect the same behaviour with tables, but I have not tested that.
*If the block follows another pre-formatted block, the contents gets appended to the end of that block.
In all cases this can be worked around by inserting and then backspacing a new line at the start of the block.
In cases when there is a line of normal text, a blank line or a single line template before the pre-formatted block then pressing delete at the end of that line appends the contents of the block at the cursor position as normal text.
The differing behaviour of single and multi-line templates may be related to bug 51708