diff --git a/IPython/html/static/notebook/js/textcell.js b/IPython/html/static/notebook/js/textcell.js index 377a761..7c519f4 100644 --- a/IPython/html/static/notebook/js/textcell.js +++ b/IPython/html/static/notebook/js/textcell.js @@ -515,9 +515,8 @@ var IPython = (function (IPython) { HeadingCell.prototype.render = function () { if (this.rendered === false) { var text = this.get_text(); - // Markdown headings must be a single line, - // truncate invalid input - text = text.split('\n')[0]; + // Markdown headings must be a single line + text = text.replace(/\n/g, ' '); if (text === "") { text = this.placeholder; } text = Array(this.level + 1).join("#") + " " + text; text = IPython.mathjaxutils.remove_math(text);