@jupyterlab/rendermime
Advanced tools
Comparing version 0.5.0 to 0.6.0
import { Token } from '@phosphor/coreutils'; | ||
import { RenderMime } from './rendermime'; | ||
import '../style/index.css'; | ||
export * from './latex'; | ||
@@ -4,0 +5,0 @@ export * from './mimemodel'; |
@@ -9,2 +9,3 @@ "use strict"; | ||
var coreutils_1 = require("@phosphor/coreutils"); | ||
require("../style/index.css"); | ||
__export(require("./latex")); | ||
@@ -11,0 +12,0 @@ __export(require("./mimemodel")); |
import { Message } from '@phosphor/messaging'; | ||
import { Widget } from '@phosphor/widgets'; | ||
import { RenderMime } from '.'; | ||
export declare const HTML_COMMON_CLASS = "jp-RenderedHTMLCommon"; | ||
export declare class RenderedHTMLCommon extends Widget { | ||
@@ -6,0 +5,0 @@ constructor(options: RenderMime.IRenderOptions); |
@@ -23,3 +23,3 @@ "use strict"; | ||
*/ | ||
exports.HTML_COMMON_CLASS = 'jp-RenderedHTMLCommon'; | ||
var HTML_COMMON_CLASS = 'jp-RenderedHTMLCommon'; | ||
/* | ||
@@ -69,3 +69,3 @@ * The class name added to rendered HTML. | ||
var _this = _super.call(this) || this; | ||
_this.addClass(exports.HTML_COMMON_CLASS); | ||
_this.addClass(HTML_COMMON_CLASS); | ||
return _this; | ||
@@ -413,13 +413,31 @@ } | ||
anchor.target = '_blank'; | ||
// Get the link path without the location prepended. | ||
// (e.g. "./foo.md#Header 1" vs "http://localhost:8888/foo.md#Header 1") | ||
var href = anchor.getAttribute('href'); | ||
if (!href) { | ||
// Bail if it is not a file-like url. | ||
if (!href || href.indexOf('://') !== -1 && href.indexOf('//') === 0) { | ||
return Promise.resolve(void 0); | ||
} | ||
// Remove the hash until we can handle it. | ||
var hash = anchor.hash; | ||
if (hash) { | ||
// Handle internal link in the file. | ||
if (hash === href) { | ||
anchor.target = '_self'; | ||
return Promise.resolve(void 0); | ||
} | ||
// For external links, remove the hash until we have hash handling. | ||
href = href.replace(hash, ''); | ||
} | ||
// Get the appropriate file path. | ||
return resolver.resolveUrl(href).then(function (path) { | ||
// Handle the click override. | ||
if (linkHandler) { | ||
linkHandler.handleLink(anchor, path); | ||
} | ||
// Get the appropriate file download path. | ||
return resolver.getDownloadUrl(path); | ||
}).then(function (url) { | ||
anchor.href = url; | ||
// Set the visible anchor. | ||
anchor.href = url + hash; | ||
}); | ||
@@ -458,3 +476,3 @@ } | ||
} | ||
codemirror_1.requireMode(lang).then(function (spec) { | ||
codemirror_1.Mode.ensure(lang).then(function (spec) { | ||
var el = document.createElement('div'); | ||
@@ -467,3 +485,3 @@ if (!spec) { | ||
try { | ||
codemirror_1.runMode(code, spec.mime, el); | ||
codemirror_1.Mode.run(code, spec.mime, el); | ||
callback(null, el.innerHTML); | ||
@@ -470,0 +488,0 @@ } |
{ | ||
"name": "@jupyterlab/rendermime", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "JupyterLab - RenderMime", | ||
@@ -16,6 +16,6 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@jupyterlab/apputils": "^0.5.0", | ||
"@jupyterlab/codemirror": "^0.5.0", | ||
"@jupyterlab/coreutils": "^0.5.0", | ||
"@jupyterlab/services": "^0.44.0", | ||
"@jupyterlab/apputils": "^0.6.0", | ||
"@jupyterlab/codemirror": "^0.6.0", | ||
"@jupyterlab/coreutils": "^0.6.0", | ||
"@jupyterlab/services": "^0.45.0", | ||
"@phosphor/algorithm": "^1.1.0", | ||
@@ -22,0 +22,0 @@ "@phosphor/coreutils": "^1.1.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77012
2499
+ Added@jupyterlab/application@0.6.0(transitive)
+ Added@jupyterlab/apputils@0.6.0(transitive)
+ Added@jupyterlab/codeeditor@0.6.0(transitive)
+ Added@jupyterlab/codemirror@0.6.0(transitive)
+ Added@jupyterlab/coreutils@0.6.0(transitive)
+ Added@jupyterlab/services@0.45.0(transitive)
- Removed@jupyterlab/application@0.5.0(transitive)
- Removed@jupyterlab/apputils@0.5.0(transitive)
- Removed@jupyterlab/codeeditor@0.5.0(transitive)
- Removed@jupyterlab/codemirror@0.5.0(transitive)
- Removed@jupyterlab/coreutils@0.5.0(transitive)
- Removed@jupyterlab/services@0.44.0(transitive)
- Removed@types/minimist@1.2.5(transitive)
Updated@jupyterlab/apputils@^0.6.0
Updated@jupyterlab/coreutils@^0.6.0
Updated@jupyterlab/services@^0.45.0