What needs to be fixed
In option=com_templates&view=template
the file tree on the left highlights both files as "active" when the names are similar, like menu.less
and mmenu.less
.
How would you fix it
The root-cause of this issue is the way the active item is set. Currently this happens with a piece of JavaScript and a regex: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_templates/views/template/tmpl/default.php#L91
Either the regex is insufficient or the method of comparison is not the right one.
Side Effects expected
I am not sure why a regex is used here instead of a ===
or something like that. Maybe there are some unwanted side effects I am not aware of?
Test PR #25399 please.