We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aef0a6a commit d606a9cCopy full SHA for d606a9c
src/jupyter_contrib_nbextensions/nbextensions/python-markdown/main.js
@@ -90,9 +90,9 @@ define([
90
} else {
91
html = marked(ul['text/plain']);
92
// [\s\S] is used to also catch newlines
93
- var t = html.match(/<p>([\s\S]*?)<\/p>/)[1]; //strip <p> and </p> that marked adds and we don't want
94
- html = t ? t : html;
95
- var q = html.match(/'([\s\S]*?)'/); // strip quotes from strings
+ var t = html.match(/^<p>([\s\S]*?)<\/p>$/); //strip <p> and </p> that marked adds and we don't want
+ html = t !== null ? t[1] : html;
+ var q = html.match(/^'([\s\S]*?)'$/); // strip quotes from strings
96
if (q !== null) html = q[1]
97
}
98
0 commit comments