diff --git a/src/data/generate-data.js b/src/data/generate-data.js index 818292f..9a8c82f 100644 --- a/src/data/generate-data.js +++ b/src/data/generate-data.js @@ -25,7 +25,11 @@ const builtins = $$("a#toc-Builtin-Functions+ul > li").map(element => { doc += "\n```"; } else { curr_paragraph.childNodes.forEach(elem => { - doc += elem.textContent.replace(/(\s\s+)/gm, " "); + if (elem.nodeName == "CODE") { + console.log(elem.innerHTML); + doc += "`" + elem.innerHTML.replaceAll(/(.+?)<\/span>/gm, "$1") + "`"; + } else + doc += elem.textContent.replace(/(\s\s+)/gm, " "); }); }