Skip to content

Commit 8751125

Browse files
committed
archive
1 parent 0fa5e49 commit 8751125

File tree

4 files changed

+62
-2
lines changed

4 files changed

+62
-2
lines changed

1.10/markdeep.js

+30
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,36 @@ function measureFontSize(fontStack) {
9494
}
9595
}
9696

97+
// IE11 polyfill needed by Highlight.js, from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill
98+
if (typeof Object.assign !== 'function') {
99+
// Must be writable: true, enumerable: false, configurable: true
100+
Object.defineProperty(Object, "assign", {
101+
value: function assign(target, varArgs) { // .length of function is 2
102+
if (target === null || target === undefined) {
103+
throw new TypeError('Cannot convert undefined or null to object');
104+
}
105+
106+
var to = Object(target);
107+
108+
for (var index = 1; index < arguments.length; index++) {
109+
var nextSource = arguments[index];
110+
111+
if (nextSource !== null && nextSource !== undefined) {
112+
for (var nextKey in nextSource) {
113+
// Avoid bugs when hasOwnProperty is shadowed
114+
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
115+
to[nextKey] = nextSource[nextKey];
116+
}
117+
}
118+
}
119+
}
120+
return to;
121+
},
122+
writable: true,
123+
configurable: true
124+
});
125+
}
126+
97127
/*
98128
Highlight.js 10.0.0-beta.0 (ca23180c)
99129
License: BSD-3-Clause

1.10/markdeep.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

latest/markdeep.js

+30
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,36 @@ function measureFontSize(fontStack) {
9494
}
9595
}
9696

97+
// IE11 polyfill needed by Highlight.js, from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill
98+
if (typeof Object.assign !== 'function') {
99+
// Must be writable: true, enumerable: false, configurable: true
100+
Object.defineProperty(Object, "assign", {
101+
value: function assign(target, varArgs) { // .length of function is 2
102+
if (target === null || target === undefined) {
103+
throw new TypeError('Cannot convert undefined or null to object');
104+
}
105+
106+
var to = Object(target);
107+
108+
for (var index = 1; index < arguments.length; index++) {
109+
var nextSource = arguments[index];
110+
111+
if (nextSource !== null && nextSource !== undefined) {
112+
for (var nextKey in nextSource) {
113+
// Avoid bugs when hasOwnProperty is shadowed
114+
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
115+
to[nextKey] = nextSource[nextKey];
116+
}
117+
}
118+
}
119+
}
120+
return to;
121+
},
122+
writable: true,
123+
configurable: true
124+
});
125+
}
126+
97127
/*
98128
Highlight.js 10.0.0-beta.0 (ca23180c)
99129
License: BSD-3-Clause

latest/markdeep.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)