diff options
author | Wu Cheng-Han | 2016-10-29 23:33:16 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-10-29 23:33:16 +0800 |
commit | a563a15bab53f6005cd169ce5ea8ceab764f86cb (patch) | |
tree | 4d4fb61176377fd64812d993ac76fe39d331af1b | |
parent | dae141a9d3341d9f5dbd6e547ae4a5879772007f (diff) |
Fix generateCleanHTML not remove smoothhashscroll attribute properly
Diffstat (limited to '')
-rw-r--r-- | public/js/extra.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/public/js/extra.js b/public/js/extra.js index dba77f40..da8ef175 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -533,7 +533,7 @@ function generateCleanHTML(view) { eles.removeClass('part'); src.find('*[class=""]').removeAttr('class'); eles.removeAttr('data-startline data-endline'); - eles.find("a[href^='#'][smoothhashscroll]").removeAttr('smoothhashscroll'); + src.find("a[href^='#'][smoothhashscroll]").removeAttr('smoothhashscroll'); //remove gist content src.find("code[data-gist-id]").children().remove(); //disable todo list @@ -584,9 +584,9 @@ function exportToHTML(view) { var src = generateCleanHTML(view); //generate toc var toc = $('#ui-toc').clone(); - toc.find('*').removeClass('active'); + toc.find('*').removeClass('active').find("a[href^='#'][smoothhashscroll]").removeAttr('smoothhashscroll'); var tocAffix = $('#ui-toc-affix').clone(); - tocAffix.find('*').removeClass('active'); + tocAffix.find('*').removeClass('active').find("a[href^='#'][smoothhashscroll]").removeAttr('smoothhashscroll'); //generate html via template $.get(serverurl + '/css/html.min.css', function (css) { $.get(serverurl + '/views/html.hbs', function (data) { |