From a2db0ffda1c30c3449e96e7b4b0fcc5092fcb770 2013-07-06 16:51:56 From: Matthias Bussonnier Date: 2013-07-06 16:51:56 Subject: [PATCH] Merge pull request #3557 from minrk/target_blank open markdown links in new tabs --- diff --git a/IPython/html/static/notebook/js/textcell.js b/IPython/html/static/notebook/js/textcell.js index 7f99ab0..848d92e 100644 --- a/IPython/html/static/notebook/js/textcell.js +++ b/IPython/html/static/notebook/js/textcell.js @@ -317,7 +317,9 @@ var IPython = (function (IPython) { if (text === "") { text = this.placeholder; } text = IPython.mathjaxutils.remove_math(text); var html = marked.parser(marked.lexer(text)); - html = IPython.mathjaxutils.replace_math(html); + html = $(IPython.mathjaxutils.replace_math(html)); + // links in markdown cells should open in new tabs + html.find("a[href]").attr("target", "_blank"); try { this.set_rendered(html); } catch (e) {