ITADN

remove id window.location.hash

#280Opentdhock 创建于 2025-11-28
beginner-task
T
tdhockcommented
there is some old code which seems to be causing an error when rendering in Rmd with some urls that have `#id` suffixes. ```js if(window.location.hash) { var fragment=window.location.hash; fragment=fragment.slice(1); fragment=decodeURI(fragment) var frag_array=fragment.split(/(.*?})/); frag_array=frag_array.filter(function(x){ return x!=""}) frag_array.forEach(function(selector_string){ var selector_hash=selector_string.split("="); var selector_nam=selector_hash[0]; ... ``` this old code is untested and should be removed to avoid such errors.
0 条评论