diff --git a/webclient/src/Article.js b/webclient/src/Article.js
index 8eea2f5..78c3a06 100644
--- a/webclient/src/Article.js
+++ b/webclient/src/Article.js
@@ -58,10 +58,52 @@ function Article({ cache }) {
};
const isCodeBlock = (v) => {
- console.log(v);
return v.localName === 'pre' || v.localName === 'code' || (v.firstElementChild && v.firstElementChild.localName === 'code');
};
+ const renderNodes = (nodes, keyPrefix = '') => {
+ return Array.from(nodes).map((v, k) => {
+ const key = `${keyPrefix}${k}`;
+ if (pConv.includes(key)) {
+ return (
+
+ if (keyPrefix === '' && v.data.trim() !== '') { + return
{v.data}
; + } + return v.data; + } + + if (v.nodeType !== Node.ELEMENT_NODE) { + return null; + } + + const Tag = v.localName; + if (isCodeBlock(v)) { + return ( +{v.data}
- : -Problem getting article :(