Steps to reproduce:
- Start a blank page and add this wikitext:
<ref group="note">a</ref> ==Notes== <references group="note" /> ==General references== <references />
- Switch to VisualEditor.
- Edit the <ref> and change the group from "note" to "General references". For the moment it looks like this works as expected.
- Click "Publish changes" and "Review your changes". The visual diff looks correct, but the wikitext diff still shows the group="note" that shouldn't be there any more. Yes, the two diffs are actually out of sync at this point.
- Switch back to the wikitext editor, or just save the page. In either case the group="note" is not removed.
The same thing happens when editing the <references> tag:
- Start a blank page with nothing but <references group="note" />. (This will render as an empty page. Don't be confused. This is correct.)
- Switch to VisualEditor, edit the reference list, and remove the group. As above, it appears like this works, but the group won't disappear from the wikitext serialization.
The issue is the same in both cases, in two unrelated lines of code: https://gerrit.wikimedia.org/r/1005500