Steps to replicate the issue (include links if applicable):
- Make a page with <syntaxhighlight inline lang="perl">use strict;</syntaxhighlight>.
- Edit the page in Visual Editor.
- Change use strict; to use strict; use warnings;
- Publish the page.
(I already did all of the above at https://en.wikipedia.org/wiki/User:Amire80/syntaxhighlight-inline .)
What happens?:
The page's content is now <syntaxhighlight inline="" lang="perl">use strict; use warnings;</syntaxhighlight>. Note that inline changed to inline="".
What should have happened instead?:
The page's content should be <syntaxhighlight inline lang="perl">use strict; use warnings;</syntaxhighlight>. Only the content of the tag changed, and not its attributes, so adding ="" is somewhat dirty, even if the rendering is identical.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
The current version on Wikipedia.
Other information (browser name/version, screenshots, etc.):
Discussed also at https://www.mediawiki.org/wiki/Topic:Y3oum1oimn0c6z47