@nteract/markdown
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -14,2 +14,3 @@ "use strict"; | ||
const MathJax = __importStar(require("@nteract/mathjax")); | ||
const presentational_components_1 = require("@nteract/presentational-components"); | ||
const react_1 = __importDefault(require("react")); | ||
@@ -20,7 +21,9 @@ const react_markdown_1 = __importDefault(require("react-markdown")); | ||
const inlineMath = (props) => (react_1.default.createElement(MathJax.Node, { inline: true }, props.value)); | ||
const code = (props) => (react_1.default.createElement(presentational_components_1.Source, { language: props.language }, props.value)); | ||
const MarkdownRender = (props) => { | ||
const newProps = Object.assign({}, props, { escapeHtml: false, plugins: [remark_math_1.default], renderers: Object.assign({}, props.renderers, { math, | ||
inlineMath }) }); | ||
inlineMath, | ||
code }) }); | ||
return react_1.default.createElement(react_markdown_1.default, Object.assign({}, newProps)); | ||
}; | ||
exports.default = MarkdownRender; |
{ | ||
"name": "@nteract/markdown", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Markdown/MathJax renderer for nteract", | ||
@@ -23,3 +23,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "8125bd8f3d7db2ca479d1b078379b5061625cd8f" | ||
"gitHead": "81f0f5c66e0b9ab194719cb0c09eaf7329cd623c" | ||
} |
@@ -8,3 +8,6 @@ { | ||
"include": ["src"], | ||
"references": [{ "path": "../mathjax" }] | ||
"references": [ | ||
{ "path": "../mathjax" }, | ||
{ "path": "../presentational-components" } | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
42978
24
943
1