Web IDE: syntax highlighting after re-naming a file doesn't work
Summary
This is a follow up on https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/16539
When re-naming an entry, the file preview doesn't pick up the new extension if added/changed and stays on the highlighting of the original file.
Steps to reproduce
- In Web IDE, pick a file. Let's say with the
.md
extension. - Re-name it to another extension type (for example to
.js
) - The preview and highlighting remains relevant for
.md
rather than.js
extension
What is the current bug behavior?
The preview options and syntax highlighting don't respect new extension after a file's renaming.
What is the expected correct behavior?
Preview and syntax highlighting change depending on the new file's extension