variant: fix variant detection for official documentation #188

This commit is contained in:
Sören Weber 2022-02-19 17:13:28 +01:00
parent 3ff5aa9c82
commit fb2df556bc
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589

View file

@ -36,7 +36,7 @@
if( !s || !s.match ){ if( !s || !s.match ){
return ''; return '';
} }
var matches = s.match(/^.*\/?theme-(.*?)\.css.*$/); var matches = s.match(/^.*\/?theme-([^\/]*?)\.css.*$/);
var theme = matches && matches.length == 2 ? matches[ 1 ] : ''; var theme = matches && matches.length == 2 ? matches[ 1 ] : '';
return theme; return theme;
} }