Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
54693694
Unverified
Commit
54693694
authored
Mar 08, 2021
by
Sylvain Gugger
Committed by
GitHub
Mar 08, 2021
Browse files
Fix version control with anchors (#10595)
* Fix version control with anchors * Simplify
parent
f8829660
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
docs/source/_static/js/custom.js
docs/source/_static/js/custom.js
+1
-1
No files found.
docs/source/_static/js/custom.js
View file @
54693694
...
@@ -128,7 +128,7 @@ function addVersionControl() {
...
@@ -128,7 +128,7 @@ function addVersionControl() {
const
parts
=
location
.
toString
().
split
(
'
/
'
);
const
parts
=
location
.
toString
().
split
(
'
/
'
);
let
versionIndex
=
parts
.
length
-
2
;
let
versionIndex
=
parts
.
length
-
2
;
// Index page may not have a last part with filename.html so we need to go up
// Index page may not have a last part with filename.html so we need to go up
if
(
parts
[
parts
.
length
-
1
]
!=
""
&&
!
parts
[
parts
.
length
-
1
].
match
(
/
\.
html
$|^search.html
?
/
))
{
if
(
parts
[
parts
.
length
-
1
]
!=
""
&&
!
parts
[
parts
.
length
-
1
].
match
(
/
\.
html/
))
{
versionIndex
=
parts
.
length
-
1
;
versionIndex
=
parts
.
length
-
1
;
}
}
// Main classes and models are nested so we need to go deeper
// Main classes and models are nested so we need to go deeper
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment