merge heading lines

markdown headings must be a single line
This commit is contained in:
MinRK 2013-07-10 14:41:03 -07:00
parent b5f0be18de
commit 185769d1b9

View File

@ -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);