diff --git a/IPython/frontend/html/notebook/static/js/textcell.js b/IPython/frontend/html/notebook/static/js/textcell.js index 65d96a0a5..90100b2db 100644 --- a/IPython/frontend/html/notebook/static/js/textcell.js +++ b/IPython/frontend/html/notebook/static/js/textcell.js @@ -516,7 +516,16 @@ var IPython = (function (IPython) { HeadingCell.prototype.set_rendered = function (text) { var r = this.element.find("div.text_cell_render"); r.empty(); - r.append($('').html(text)); + r.append( + $('') + .addClass('heading-link') + .attr('href', '#' + text) + .attr('name', text) + .append( + $('') + .html(text) + ) + ); }; diff --git a/IPython/frontend/html/notebook/static/less/notebook.less b/IPython/frontend/html/notebook/static/less/notebook.less index acedafdac..06fd0eef7 100644 --- a/IPython/frontend/html/notebook/static/less/notebook.less +++ b/IPython/frontend/html/notebook/static/less/notebook.less @@ -468,3 +468,8 @@ p { margin-bottom:0; } + +a.heading-link:link { + text-decoration: none; + color: inherit; +}