diff --git a/IPython/frontend/html/notebook/static/css/style.min.css b/IPython/frontend/html/notebook/static/css/style.min.css index 18f18c7..563c07d 100644 --- a/IPython/frontend/html/notebook/static/css/style.min.css +++ b/IPython/frontend/html/notebook/static/css/style.min.css @@ -934,6 +934,7 @@ pre,code,kbd,samp{white-space:pre-wrap;} .js-error{color:darkred;} a{text-decoration:underline;} p{margin-bottom:0;} +a.heading-link:link{text-decoration:none;color:inherit;} @media print{body{overflow:visible !important;} div#notebook{overflow:visible !important;} .ui-widget-content{border:0px;} #save_widget{margin:0px !important;} #header,#pager,#pager_splitter,#menubar,#toolbar{display:none !important;} .cell{border:none !important;} .toolbar{display:none;}}.rendered_html{color:black;}.rendered_html em{font-style:italic;} .rendered_html strong{font-weight:bold;} .rendered_html u{text-decoration:underline;} diff --git a/IPython/frontend/html/notebook/static/js/textcell.js b/IPython/frontend/html/notebook/static/js/textcell.js index 65d96a0..90100b2 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 acedafd..06fd0ee 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; +}