10000 DOC: Implement javascript to redirect old whatsnew pages to new ones by ismailuddin · Pull Request #23708 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DOC: Implement javascript to redirect old whatsnew pages to new ones #23708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove trailing whitespace
  • Loading branch information
ismailuddin committed Nov 16, 2018
commit 7b7315d0f4cc0ffab34659cda1002ee473205fa8
4 changes: 2 additions & 2 deletions doc/source/_static/js/whatsnew_links.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
const links = Array.from(document.getElementsByTagName("a"));
links.forEach((link) => {
const re = /(whatsnew.html)#(whatsnew)-[\d]+(-\w+)+/g;
let linkElements = link.href.split("/");
let linkElements = link.href.split("/");
if (re.test(linkElements.slice(-1)[0])) {
let whatsNew = linkElements.slice(-1)[0].split("#");
whatsNew = generateWhatsNew(whatsNew);
linkElements[linkElements.length - 1] = whatsNew;
link.href = linkElements.join("/")
link.href = linkElements.join("/");
}
});
})();
0