diff --git a/build/pkgs/notebook/package-version.txt b/build/pkgs/notebook/package-version.txt index f0cd2d909bb..427ea92c3db 100644 --- a/build/pkgs/notebook/package-version.txt +++ b/build/pkgs/notebook/package-version.txt @@ -1 +1 @@ -4.0.4.p2 +4.0.4.p3 diff --git a/build/pkgs/notebook/patches/help_link_url_fix.patch b/build/pkgs/notebook/patches/help_link_url_fix.patch new file mode 100644 index 00000000000..cfa07dee3d3 --- /dev/null +++ b/build/pkgs/notebook/patches/help_link_url_fix.patch @@ -0,0 +1,24 @@ +Use require.toUrl for help_links + +Dirty patch for the minified js, real PR is at +https://github.com/jupyter/notebook/pull/958 + + +--- a/notebook/static/notebook/js/main.min.js 2016-01-15 10:20:30.769442884 +0100 ++++ b/notebook/static/notebook/js/main.min.js 2016-01-15 10:20:53.073164049 +0100 +@@ -28358,7 +28358,7 @@ + .append($("") + .attr('target', '_blank') + .attr('title', 'Opens in a new window') +- .attr('href', link.url) ++ .attr('href', require.toUrl(link.url)) + .append($("") + .addClass("fa fa-external-link menu-icon pull-right") + ) +@@ -30547,4 +30547,4 @@ + define("notebook/js/main", function(){}); + + +-//# sourceMappingURL=main.min.js.map +\ No newline at end of file ++//# sourceMappingURL=main.min.js.map diff --git a/src/sage/repl/ipython_kernel/kernel.py b/src/sage/repl/ipython_kernel/kernel.py index eb61032dbd7..9639322050a 100644 --- a/src/sage/repl/ipython_kernel/kernel.py +++ b/src/sage/repl/ipython_kernel/kernel.py @@ -81,22 +81,27 @@ def help_links(self): See the Jupyter documentation. + .. NOTE:: + + Urls starting with "kernelspecs" are prepended by the + browser with the appropriate path. + EXAMPLES:: sage: from sage.repl.ipython_kernel.kernel import SageKernel sage: sk = SageKernel.__new__(SageKernel) sage: sk.help_links [{'text': 'Sage Documentation', - 'url': '../kernelspecs/sagemath/doc/index.html'}, + 'url': 'kernelspecs/sagemath/doc/index.html'}, ...] """ from sage.repl.ipython_kernel.install import SageKernelSpec identifier = SageKernelSpec.identifier() - kernel_url = lambda x: '../kernelspecs/{0}/{1}'.format(identifier, x) + kernel_url = lambda x: 'kernelspecs/{0}/{1}'.format(identifier, x) return [ { 'text': 'Sage Documentation', - 'url': kernel_url('doc/index.html') + 'url': kernel_url('doc/index.html'), }, { 'text': 'Sage Tutorial',