Replace spaces with underscores when mapping filenames to ids in the showcase, closes #1926

This commit is contained in:
Carson
2019-09-09 17:49:33 -05:00
parent b889b0d2b0
commit e5dcd5e574
2 changed files with 6 additions and 7 deletions

View File

@@ -82,7 +82,7 @@
el = document.createElement("span");
el.id = "srcref_" + srcref;
var ref = srcref;
var code = document.getElementById(srcfile.replace(/\./g, "_") + "_code");
var code = document.getElementById(srcfile.replace(/\.|\s+/g, "_") + "_code");
// if there is no code file (might be a shiny file), quit early
if (!code) return;
var start = findTextPoint(code, ref[0], ref[4]);