As noted in T385369, which documents the behaviour for [ reply ] links on talk pages, this also happens for section edit links, and leads to copy paste errors such as this:
https://en.wikipedia.org/w/index.php?title=Kaj%C3%A1sz%C3%B3&oldid=1234461977#Notes_[_edit_]
(more examples: https://en.wikipedia.org/w/index.php?search=insource%3A%2F%5C%5B+edit+%2F&title=Special:Search&profile=advanced&fulltext=1&ns0=1)
- Open an article while logged in and select from the paragraph before a heading with a section edit link to the paragraph after
- Copy
- Paste into VE
Expected
The [ edit ] or [ edit | edit source ] links are not pasted at all
Actual
The links are pasted as plain text