Skip to content

Commit

Permalink
Fix links in headers
Browse files Browse the repository at this point in the history
  * Closes #26
  • Loading branch information
Dynalon committed Nov 11, 2013
1 parent 2133db4 commit 4eb15c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/basic_skeleton.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@
$('h1,h2,h3,h4,h5,h6').each (function () {
var $heading = $(this);
$heading.addClass('md-inpage-anchor');
var href = $.md.util.getInpageAnchorHref($heading.toptext());
var text = $heading.clone().children('.anchor-highlight').remove().end().text();
var href = $.md.util.getInpageAnchorHref(text);
$heading.click (function (){
window.location.hash = href;
});
Expand Down

0 comments on commit 4eb15c8

Please sign in to comment.