Update src/data/generate-data.js to translate code tags
This commit is contained in:
parent
3feba5ec0b
commit
c3c4eb9c9d
@ -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 .+?>(.+?)<\/span>/gm, "$1") + "`";
|
||||
} else
|
||||
doc += elem.textContent.replace(/(\s\s+)/gm, " ");
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user