Fixed mardown rendering bug.

The wrong signature of `$()` was being used
wrong: http://api.jquery.com/jQuery/#jQuery1
right: http://api.jquery.com/jQuery/#jQuery2

Instead of implictly calling parseHTML, call it explicitly.
closes #5943
Jonathan Frederic 12 years ago
parent d095c8b76c
commit d84c8fa863

@ -256,7 +256,7 @@ var IPython = (function (IPython) {
var html = marked.parser(marked.lexer(text));
html = IPython.mathjaxutils.replace_math(html, math);
html = security.sanitize_html(html);
html = $(html);
html = $($.parseHTML(html));
// links in markdown cells should open in new tabs
html.find("a[href]").not('[href^="#"]').attr("target", "_blank");
this.set_rendered(html);
@ -428,7 +428,7 @@ var IPython = (function (IPython) {
var html = marked.parser(marked.lexer(text));
html = IPython.mathjaxutils.replace_math(html, math);
html = security.sanitize_html(html);
var h = $(html);
var h = $($.parseHTML(html));
// add id and linkback anchor
var hash = h.text().replace(/ /g, '-');
h.attr('id', hash);

Loading…
Cancel
Save