diff --git a/webclient/src/Article.js b/webclient/src/Article.js index 83f0310..a33b317 100644 --- a/webclient/src/Article.js +++ b/webclient/src/Article.js @@ -60,7 +60,7 @@ function Article({ cache }) { }; const isCodeBlock = (v) => { - return v.localName === 'pre' || v.localName === 'code' || (v.firstElementChild && v.firstElementChild.localName === 'code'); + return v.localName === 'pre' || (v.localName === 'code' && !v.closest('p')); }; const renderNodes = (nodes, keyPrefix = '') => {