Skip to content

Commit a17a122

Browse files
committed
Strip localization code from docs [path] template variable
1 parent 2bdaaaa commit a17a122

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/page.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ function onDocumentLoad( event ) {
3535

3636
case 'api':
3737
path = /\/api\/[A-z0-9\/]+/.exec( pathname ).toString().substr( 5 );
38+
39+
// Remove localized part of the path (e.g. 'en/' or 'es-MX/'):
40+
path = path.replace( /^[A-z0-9-]+\//, '' );
41+
3842
break;
3943

4044
case 'examples':

0 commit comments

Comments
 (0)