Merge from vscode 313ede61cbad8f9dc748907b3384e059ddddb79a (#7436)

* Merge from vscode 313ede61cbad8f9dc748907b3384e059ddddb79a

* fix strict null checks
This commit is contained in:
Anthony Dresser
2019-09-30 23:35:45 -07:00
committed by GitHub
parent 6ab03053a0
commit 084524cd2d
196 changed files with 2927 additions and 2547 deletions

View File

@@ -23,7 +23,10 @@ export class MarkdownString implements IMarkdownString {
appendText(value: string): MarkdownString {
// escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
this.value += value.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&');
this.value += value
.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&')
.replace('\n', '\n\n');
return this;
}

View File

@@ -3,11 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export as namespace insane;
export = insane;
declare function insane(
export function insane(
html: string,
options?: {
readonly allowedSchemes?: readonly string[],
@@ -16,5 +12,3 @@ declare function insane(
},
strict?: boolean,
): string;
declare namespace insane { }

View File

@@ -21,11 +21,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// ESM-comment-begin
let __insane_exports;
// ESM-comment-end
let __insane_func;
(function () { function r(e, n, t) { function o(i, f) { if (!n[i]) { if (!e[i]) { var c = "function" == typeof require && require; if (!f && c) return c(i, !0); if (u) return u(i, !0); var a = new Error("Cannot find module '" + i + "'"); throw a.code = "MODULE_NOT_FOUND", a } var p = n[i] = { exports: {} }; e[i][0].call(p.exports, function (r) { var n = e[i][1][r]; return o(n || r) }, p, p.exports, r, e, n, t) } return n[i].exports } for (var u = "function" == typeof require && require, i = 0; i < t.length; i++)o(t[i]); return o } return r })()({
1: [function (require, module, exports) {
@@ -92,7 +88,7 @@ let __insane_exports;
insane.defaults = defaults;
module.exports = insane;
__insane_exports = insane;
__insane_func = insane;
}, { "./defaults": 2, "./parser": 7, "./sanitizer": 8, "assignment": 6, "he": 9 }], 5: [function (require, module, exports) {
'use strict';
@@ -469,10 +465,10 @@ let __insane_exports;
}, {}]
}, {}, [4]);
// BEGIN MONACOCHANGE
// __marked_exports = marked;
// }).call(this);
// ESM-comment-begin
define(function() { return __insane_exports; });
define(function() { return { insane: __insane_func }; });
// ESM-comment-end
// ESM-uncomment-begin
// export var insane = __insane_func;
// ESM-uncomment-end

View File

@@ -92,7 +92,10 @@ class RemoteAuthoritiesImpl {
return this._delegate(uri);
}
const authority = uri.authority;
const host = this._hosts[authority];
let host = this._hosts[authority];
if (host.indexOf(':') !== -1) {
host = `[${host}]`;
}
const port = this._ports[authority];
const connectionToken = this._connectionTokens[authority];
return URI.from({