File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/librustdoc/html/static Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 57
57
return this . indexOf ( searchString , position ) === position ;
58
58
} ;
59
59
}
60
+ if ( ! String . prototype . endsWith ) {
61
+ String . prototype . endsWith = function ( suffix , length ) {
62
+ var l = length || this . length ;
63
+ return this . indexOf ( suffix , l - suffix . length ) !== - 1 ;
64
+ } ;
65
+ }
60
66
61
67
function getPageId ( ) {
62
68
var id = document . location . href . split ( '#' ) [ 1 ] ;
1234
1240
}
1235
1241
1236
1242
function pathSplitter ( path ) {
1237
- return '<span>' + path . replace ( / : : / g, '::</span><span>' ) ;
1243
+ var tmp = '<span>' + path . replace ( / : : / g, '::</span><span>' ) ;
1244
+ if ( tmp . endsWith ( "<span>" ) ) {
1245
+ return tmp . slice ( 0 , tmp . length - 6 ) ;
1246
+ }
1247
+ return tmp ;
1238
1248
}
1239
1249
1240
1250
function addTab ( array , query , display ) {
You can’t perform that action at this time.
0 commit comments