Show More
@@ -27,7 +27,7 var IPython = (function (IPython) { | |||
|
27 | 27 | * |
|
28 | 28 | * @class TextCell |
|
29 | 29 | * @constructor TextCell |
|
30 |
* @extend I |
|
|
30 | * @extend Ipython.Cell | |
|
31 | 31 | * @param {object|undefined} [options] |
|
32 | 32 | * @param [options.cm_config] {object} config to pass to CodeMirror, will extend/overwrite default config |
|
33 | 33 | * @param [options.placeholder] {string} default string to use when souce in empty for rendering (only use in some TextCell subclass) |
@@ -285,7 +285,7 var IPython = (function (IPython) { | |||
|
285 | 285 | /** |
|
286 | 286 | * @class MarkdownCell |
|
287 | 287 | * @constructor MarkdownCell |
|
288 |
* @extends I |
|
|
288 | * @extends Ipython.HtmlCell | |
|
289 | 289 | */ |
|
290 | 290 | var MarkdownCell = function (options) { |
|
291 | 291 | var options = options || {}; |
@@ -342,7 +342,7 var IPython = (function (IPython) { | |||
|
342 | 342 | /** |
|
343 | 343 | * @class RawCell |
|
344 | 344 | * @constructor RawCell |
|
345 |
* @extends I |
|
|
345 | * @extends Ipython.TextCell | |
|
346 | 346 | */ |
|
347 | 347 | var RawCell = function (options) { |
|
348 | 348 | |
@@ -437,12 +437,12 var IPython = (function (IPython) { | |||
|
437 | 437 | |
|
438 | 438 | /** |
|
439 | 439 | * @class HeadingCell |
|
440 |
* @extends I |
|
|
440 | * @extends Ipython.TextCell | |
|
441 | 441 | */ |
|
442 | 442 | |
|
443 | 443 | /** |
|
444 | 444 | * @constructor HeadingCell |
|
445 |
* @extends I |
|
|
445 | * @extends Ipython.TextCell | |
|
446 | 446 | */ |
|
447 | 447 | var HeadingCell = function (options) { |
|
448 | 448 | |
@@ -501,17 +501,17 var IPython = (function (IPython) { | |||
|
501 | 501 | }; |
|
502 | 502 | |
|
503 | 503 | |
|
504 |
HeadingCell.prototype.set_rendered = function ( |
|
|
504 | HeadingCell.prototype.set_rendered = function (text) { | |
|
505 | 505 | var r = this.element.find("div.text_cell_render"); |
|
506 | 506 | r.empty(); |
|
507 |
var link = |
|
|
507 | var link = text.replace(/ /g, '_'); | |
|
508 | 508 | r.append( |
|
509 | 509 | $('<h'+this.level+'/>') |
|
510 | 510 | .append( |
|
511 | 511 | $('<a/>') |
|
512 | 512 | .addClass('heading-anchor') |
|
513 | 513 | .attr('id', link) |
|
514 |
.html( |
|
|
514 | .html(text) | |
|
515 | 515 | ).append( |
|
516 | 516 | $('<a/>') |
|
517 | 517 | .addClass('anchor-link') |
@@ -532,11 +532,7 var IPython = (function (IPython) { | |||
|
532 | 532 | if (this.rendered === false) { |
|
533 | 533 | var text = this.get_text(); |
|
534 | 534 | if (text === "") { text = this.placeholder; } |
|
535 | text = IPython.mathjaxutils.remove_math(text); | |
|
536 | var html = marked.parser(marked.lexer(text)); | |
|
537 | html = $(IPython.mathjaxutils.replace_math(html)).html(); | |
|
538 | ||
|
539 | this.set_rendered(html); | |
|
535 | this.set_rendered(text); | |
|
540 | 536 | this.typeset(); |
|
541 | 537 | this.element.find('div.text_cell_input').hide(); |
|
542 | 538 | this.element.find("div.text_cell_render").show(); |
General Comments 0
You need to be logged in to leave comments.
Login now