Update src/data/generate-data.js to translate code tags
This commit is contained in:
parent
3feba5ec0b
commit
c3c4eb9c9d
@ -25,6 +25,10 @@ const builtins = $$("a#toc-Builtin-Functions+ul > li").map(element => {
|
|||||||
doc += "\n```";
|
doc += "\n```";
|
||||||
} else {
|
} else {
|
||||||
curr_paragraph.childNodes.forEach(elem => {
|
curr_paragraph.childNodes.forEach(elem => {
|
||||||
|
if (elem.nodeName == "CODE") {
|
||||||
|
console.log(elem.innerHTML);
|
||||||
|
doc += "`" + elem.innerHTML.replaceAll(/<span .+?>(.+?)<\/span>/gm, "$1") + "`";
|
||||||
|
} else
|
||||||
doc += elem.textContent.replace(/(\s\s+)/gm, " ");
|
doc += elem.textContent.replace(/(\s\s+)/gm, " ");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user