mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-18 11:55:46 +08:00
Fix broken links (#3042)
* Typo fix * Fix broken links * Fix typo * Fix broken links and Fix typo
This commit is contained in:
parent
9f72eb1867
commit
5ede4c1243
@ -91,7 +91,7 @@ def atomic_writing(path, text=True, encoding='utf-8', log=None, **kwargs):
|
|||||||
**kwargs
|
**kwargs
|
||||||
Passed to :func:`io.open`.
|
Passed to :func:`io.open`.
|
||||||
"""
|
"""
|
||||||
# realpath doesn't work on Windows: http://bugs.python.org/issue9949
|
# realpath doesn't work on Windows: https://bugs.python.org/issue9949
|
||||||
# Luckily, we only need to resolve the file itself being a symlink, not
|
# Luckily, we only need to resolve the file itself being a symlink, not
|
||||||
# any of its directories, so this will suffice:
|
# any of its directories, so this will suffice:
|
||||||
if os.path.islink(path):
|
if os.path.islink(path):
|
||||||
@ -148,7 +148,7 @@ def _simple_writing(path, text=True, encoding='utf-8', log=None, **kwargs):
|
|||||||
**kwargs
|
**kwargs
|
||||||
Passed to :func:`io.open`.
|
Passed to :func:`io.open`.
|
||||||
"""
|
"""
|
||||||
# realpath doesn't work on Windows: http://bugs.python.org/issue9949
|
# realpath doesn't work on Windows: https://bugs.python.org/issue9949
|
||||||
# Luckily, we only need to resolve the file itself being a symlink, not
|
# Luckily, we only need to resolve the file itself being a symlink, not
|
||||||
# any of its directories, so this will suffice:
|
# any of its directories, so this will suffice:
|
||||||
if os.path.islink(path):
|
if os.path.islink(path):
|
||||||
|
@ -445,7 +445,7 @@ define([
|
|||||||
|
|
||||||
ShortcutManager.prototype.add_shortcut = function (shortcut, data, suppress_help_update) {
|
ShortcutManager.prototype.add_shortcut = function (shortcut, data, suppress_help_update) {
|
||||||
/**
|
/**
|
||||||
* Add a action to be handled by shortcut manager.
|
* Add an action to be handled by shortcut manager.
|
||||||
*
|
*
|
||||||
* - `shortcut` should be a `Shortcut Sequence` of the for `Ctrl-Alt-C,Meta-X`...
|
* - `shortcut` should be a `Shortcut Sequence` of the for `Ctrl-Alt-C,Meta-X`...
|
||||||
* - `data` could be an `action name`, an `action` or a `function`.
|
* - `data` could be an `action name`, an `action` or a `function`.
|
||||||
|
@ -311,7 +311,7 @@ define([
|
|||||||
// 16 default terminal colors
|
// 16 default terminal colors
|
||||||
return idx;
|
return idx;
|
||||||
} else if (idx < 232) {
|
} else if (idx < 232) {
|
||||||
// 6x6x6 color cube, see http://stackoverflow.com/a/27165165/500098
|
// 6x6x6 color cube, see https://stackoverflow.com/a/27165165/500098
|
||||||
r = Math.floor((idx - 16) / 36);
|
r = Math.floor((idx - 16) / 36);
|
||||||
r = r > 0 ? 55 + r * 40 : 0;
|
r = r > 0 ? 55 + r * 40 : 0;
|
||||||
g = Math.floor(((idx - 16) % 36) / 6);
|
g = Math.floor(((idx - 16) % 36) / 6);
|
||||||
@ -319,7 +319,7 @@ define([
|
|||||||
b = (idx - 16) % 6;
|
b = (idx - 16) % 6;
|
||||||
b = b > 0 ? 55 + b * 40 : 0;
|
b = b > 0 ? 55 + b * 40 : 0;
|
||||||
} else if (idx < 256) {
|
} else if (idx < 256) {
|
||||||
// grayscale, see http://stackoverflow.com/a/27165165/500098
|
// grayscale, see https://stackoverflow.com/a/27165165/500098
|
||||||
r = g = b = (idx - 232) * 10 + 8;
|
r = g = b = (idx - 232) * 10 + 8;
|
||||||
} else {
|
} else {
|
||||||
throw new RangeError("Color index must be < 256");
|
throw new RangeError("Color index must be < 256");
|
||||||
@ -503,7 +503,7 @@ define([
|
|||||||
return fixCarriageReturn(fixBackspace(txt));
|
return fixCarriageReturn(fixBackspace(txt));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Locate any URLs and convert them to a anchor tag
|
// Locate any URLs and convert them to an anchor tag
|
||||||
function autoLinkUrls(txt) {
|
function autoLinkUrls(txt) {
|
||||||
return txt.replace(/(^|\s)(https?|ftp)(:[^'"<>\s]+)/gi,
|
return txt.replace(/(^|\s)(https?|ftp)(:[^'"<>\s]+)/gi,
|
||||||
"$1<a target=\"_blank\" href=\"$2$3\">$2$3</a>");
|
"$1<a target=\"_blank\" href=\"$2$3\">$2$3</a>");
|
||||||
@ -525,7 +525,7 @@ define([
|
|||||||
* wrapper around contructor to avoid requiring `var a = new constructor()`
|
* wrapper around contructor to avoid requiring `var a = new constructor()`
|
||||||
* useful for passing constructors as callbacks,
|
* useful for passing constructors as callbacks,
|
||||||
* not for programmer laziness.
|
* not for programmer laziness.
|
||||||
* from http://programmers.stackexchange.com/questions/118798
|
* from https://programmers.stackexchange.com/questions/118798
|
||||||
*/
|
*/
|
||||||
return function () {
|
return function () {
|
||||||
var obj = Object.create(constructor.prototype);
|
var obj = Object.create(constructor.prototype);
|
||||||
@ -644,7 +644,7 @@ define([
|
|||||||
return cm.posFromIndex(cursor_pos);
|
return cm.posFromIndex(cursor_pos);
|
||||||
};
|
};
|
||||||
|
|
||||||
// http://stackoverflow.com/questions/2400935/browser-detection-in-javascript
|
// https://stackoverflow.com/questions/2400935/browser-detection-in-javascript
|
||||||
var browser = (function() {
|
var browser = (function() {
|
||||||
if (typeof navigator === 'undefined') {
|
if (typeof navigator === 'undefined') {
|
||||||
// navigator undefined in node
|
// navigator undefined in node
|
||||||
@ -657,7 +657,7 @@ define([
|
|||||||
return M;
|
return M;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// http://stackoverflow.com/questions/11219582/how-to-detect-my-browser-version-and-operating-system-using-javascript
|
// https://stackoverflow.com/questions/11219582/how-to-detect-my-browser-version-and-operating-system-using-javascript
|
||||||
var platform = (function () {
|
var platform = (function () {
|
||||||
if (typeof navigator === 'undefined') {
|
if (typeof navigator === 'undefined') {
|
||||||
// navigator undefined in node
|
// navigator undefined in node
|
||||||
@ -673,7 +673,7 @@ define([
|
|||||||
|
|
||||||
var get_url_param = function (name) {
|
var get_url_param = function (name) {
|
||||||
// get a URL parameter. I cannot believe we actually need this.
|
// get a URL parameter. I cannot believe we actually need this.
|
||||||
// Based on http://stackoverflow.com/a/25359264/938949
|
// Based on https://stackoverflow.com/a/25359264/938949
|
||||||
var match = new RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
|
var match = new RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
|
||||||
if (match){
|
if (match){
|
||||||
return decodeURIComponent(match[1] || '');
|
return decodeURIComponent(match[1] || '');
|
||||||
|
Loading…
Reference in New Issue
Block a user