##// END OF EJS Templates
remove unnecessary heading-anchor...
MinRK -
Show More
@@ -522,17 +522,10 var IPython = (function (IPython) {
522 text = IPython.mathjaxutils.remove_math(text);
522 text = IPython.mathjaxutils.remove_math(text);
523 var html = marked.parser(marked.lexer(text));
523 var html = marked.parser(marked.lexer(text));
524 var h = $(IPython.mathjaxutils.replace_math(html));
524 var h = $(IPython.mathjaxutils.replace_math(html));
525 // move the markdown-rendered html down one level,
525 // add id and linkback anchor
526 // into an anchor tag for linking
526 var hash = h.text().replace(/ /g, '-');
527 html = h.html();
527 h.attr('id', hash);
528 var hash = h.text().replace(/ /g, '_');
528 h.append(
529 h.empty();
530 var a = $('<a/>')
531 .addClass('heading-anchor')
532 .html(html)
533 .attr('id', hash);
534 // and append two anchors (one with the text, one clickable)
535 h.append(a).append(
536 $('<a/>')
529 $('<a/>')
537 .addClass('anchor-link')
530 .addClass('anchor-link')
538 .attr('href', '#' + hash)
531 .attr('href', '#' + hash)
@@ -19,11 +19,6 div.text_cell_render {
19 color: @textColor;
19 color: @textColor;
20 }
20 }
21
21
22 a.heading-anchor {
23 text-decoration: none;
24 color: inherit;
25 }
26
27 a.anchor-link:link {
22 a.anchor-link:link {
28 text-decoration: none;
23 text-decoration: none;
29 padding: 0px 20px;
24 padding: 0px 20px;
@@ -1551,7 +1551,6 span#checkpoint_status,span#autosave_status{font-size:small;}
1551 @media (max-width:767px){span#save_widget{font-size:small;} span#checkpoint_status,span#autosave_status{font-size:x-small;}}@media (max-width:767px){span#checkpoint_status,span#autosave_status{display:none;}}@media (min-width:768px) and (max-width:979px){span#checkpoint_status{display:none;} span#autosave_status{font-size:x-small;}}div.text_cell{padding:5px 5px 5px 5px;}
1551 @media (max-width:767px){span#save_widget{font-size:small;} span#checkpoint_status,span#autosave_status{font-size:x-small;}}@media (max-width:767px){span#checkpoint_status,span#autosave_status{display:none;}}@media (min-width:768px) and (max-width:979px){span#checkpoint_status{display:none;} span#autosave_status{font-size:x-small;}}div.text_cell{padding:5px 5px 5px 5px;}
1552 div.text_cell_input{color:#000000;border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7;}
1552 div.text_cell_input{color:#000000;border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7;}
1553 div.text_cell_render{outline:none;resize:none;width:inherit;border-style:none;padding:5px;color:#000000;}
1553 div.text_cell_render{outline:none;resize:none;width:inherit;border-style:none;padding:5px;color:#000000;}
1554 a.heading-anchor{text-decoration:none;color:inherit;}
1555 a.anchor-link:link{text-decoration:none;padding:0px 20px;visibility:hidden;}
1554 a.anchor-link:link{text-decoration:none;padding:0px 20px;visibility:hidden;}
1556 h1:hover .anchor-link,h2:hover .anchor-link,h3:hover .anchor-link,h4:hover .anchor-link,h5:hover .anchor-link,h6:hover .anchor-link{visibility:visible;}
1555 h1:hover .anchor-link,h2:hover .anchor-link,h3:hover .anchor-link,h4:hover .anchor-link,h5:hover .anchor-link,h6:hover .anchor-link{visibility:visible;}
1557 .toolbar{padding:0px 10px;margin-top:-5px;}.toolbar select,.toolbar label{width:auto;height:26px;vertical-align:middle;margin-right:2px;margin-bottom:0px;display:inline;font-size:92%;margin-left:0.3em;margin-right:0.3em;padding:0px;padding-top:3px;}
1556 .toolbar{padding:0px 10px;margin-top:-5px;}.toolbar select,.toolbar label{width:auto;height:26px;vertical-align:middle;margin-right:2px;margin-bottom:0px;display:inline;font-size:92%;margin-left:0.3em;margin-right:0.3em;padding:0px;padding-top:3px;}
General Comments 0
You need to be logged in to leave comments. Login now