"model/models/vscode:/vscode.git/clone" did not exist on "6544e1473525c381e89aba4778283900b3ad7145"
Unverified Commit 54693694 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Fix version control with anchors (#10595)

* Fix version control with anchors

* Simplify
parent f8829660
......@@ -128,7 +128,7 @@ function addVersionControl() {
const parts = location.toString().split('/');
let versionIndex = parts.length - 2;
// 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;
}
// Main classes and models are nested so we need to go deeper
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment