Skip to content

Commit

Permalink
Upgrade to marked 4.0.10 (#201)
Browse files Browse the repository at this point in the history
* upgrade to marked 4.0.10

* load marked from umd format

* check marked.umd.js package data

* use marked.marked
  • Loading branch information
echarles authored Jan 24, 2023
1 parent 4de7761 commit 1eab076
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"jquery": "components/jquery#~3.5.0",
"jquery-typeahead": "~2.10.6",
"jquery-ui": "jquery/jquery-ui#~1.13.2",
"marked": "~1.1.1",
"marked": "~4.0.10",
"MathJax": "^2.7.4",
"moment": "~2.29.4",
"react": "~16.0.0",
Expand Down
4 changes: 2 additions & 2 deletions nbclassic/static/base/js/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ define([
'base/js/utils',
'base/js/mathjaxutils',
'base/js/security',
'components/marked/lib/marked',
'components/marked/lib/marked.umd',
'codemirror/lib/codemirror',
], function($, utils, mathjaxutils, security, marked, CodeMirror){
"use strict";
Expand Down Expand Up @@ -100,7 +100,7 @@ define([
text = text_and_math[0];
math = text_and_math[1];
}
marked(text, { renderer: renderer }, function (err, html) {
marked.marked(text, { renderer: renderer }, function (err, html) {
if(!err) {
if(options.with_math) {
html = mathjaxutils.replace_math(html, math);
Expand Down
6 changes: 3 additions & 3 deletions nbclassic/static/notebook/js/shortcuteditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ define([
"jquery",
"notebook/js/quickhelp",
"base/js/dialog",
"components/marked/lib/marked"
"components/marked/lib/marked.umd"
], function (
$,
QH,
Expand Down Expand Up @@ -106,7 +106,7 @@ var KeyBindingList = createReactClass({
});
children.unshift(React.createElement('div', {className:'well', key:'disclamer', id:'short-key-binding-intro', dangerouslySetInnerHTML:
{__html:
marked(
marked.marked(

"Here you can modify the keyboard shortcuts available in "+
"command mode. Your changes will be stored for later sessions. "+
Expand All @@ -115,7 +115,7 @@ var KeyBindingList = createReactClass({
}));
children.push(React.createElement('div', {className:'well', key:'disclamer', id:'long-key-binding-intro', dangerouslySetInnerHTML:
{__html:
marked(
marked.marked(

"This dialog allows you to modify the keyboard shortcuts available in command mode. "+
"Any changes will be persisted between sessions and across environments. "+
Expand Down
4 changes: 2 additions & 2 deletions nbclassic/static/tree/js/notebooklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define([
'base/js/keyboard',
'moment',
'bidi/bidi',
'components/marked/lib/marked'
'components/marked/lib/marked.umd'
], function($, IPython, utils, i18n, dialog, events, keyboard, moment, bidi, marked) {
"use strict";

Expand Down Expand Up @@ -544,7 +544,7 @@ define([
span12.empty();
that.contents.get(list_item.path, {"content": true}).then(
function (data) {
span12.append($('<div style="margin:auto;text-align:center;color:grey"/>').innerHTML = marked(data.content));
span12.append($('<div style="margin:auto;text-align:center;color:grey"/>').innerHTML = marked.marked(data.content));
},
function(error) {
span12.append(i18n.msg._("Server error: ") + error.message);
Expand Down
2 changes: 1 addition & 1 deletion setupbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def find_package_data():
pjoin(components, "jquery-ui", "dist", "jquery-ui.min.js"),
pjoin(components, "jquery-ui", "dist", "themes", "smoothness", "jquery-ui.min.css"),
pjoin(components, "jquery-ui", "dist", "themes", "smoothness", "images", "*"),
pjoin(components, "marked", "lib", "marked.js"),
pjoin(components, "marked", "lib", "marked.umd.js"),
pjoin(components, "react", "react.production.min.js"),
pjoin(components, "react", "react-dom.production.min.js"),
pjoin(components, "requirejs", "require.js"),
Expand Down

0 comments on commit 1eab076

Please sign in to comment.