Commit 6bb6996d authored by Marcel Stör's avatar Marcel Stör
Browse files

Fix GitHub source code link in docs for 'latest' path

parent 83948100
...@@ -202,7 +202,11 @@ var nodemcu = nodemcu || {}; ...@@ -202,7 +202,11 @@ var nodemcu = nodemcu || {};
if (window.location.origin.indexOf('readthedocs') > -1) { if (window.location.origin.indexOf('readthedocs') > -1) {
// path is like /en/<branch>/<lang>/build/ -> extract 'lang' // path is like /en/<branch>/<lang>/build/ -> extract 'lang'
// split[0] is an '' because the path starts with the separator // split[0] is an '' because the path starts with the separator
branch = path.split('/')[2]; var thirdPathSegment = path.split('/')[2];
// 'latest' is an alias on RTD for the 'dev' branch - which is the default for 'branch' here
if (thirdPathSegment != 'latest') {
branch = thirdPathSegment;
}
} }
return branch; return branch;
} }
......
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