diff --git a/samples/seed/articles/markdown.md b/samples/seed/articles/markdown.md
index 95a570a9137..0558f7cf7fd 100644
--- a/samples/seed/articles/markdown.md
+++ b/samples/seed/articles/markdown.md
@@ -166,3 +166,13 @@ REST API content, independent of platform...
---
```
+
+## Details
+
+
+Demo
+
+```
+root@server# apt-get install nano
+```
+
diff --git a/templates/modern/src/markdown.ts b/templates/modern/src/markdown.ts
index f18075d2cd5..5ff87610609 100644
--- a/templates/modern/src/markdown.ts
+++ b/templates/modern/src/markdown.ts
@@ -176,7 +176,7 @@ function renderLinks() {
*/
function renderCodeCopy() {
document.querySelectorAll('pre>code').forEach(code => {
- if (code.innerText.trim().length === 0) {
+ if (code.textContent.trim().length === 0) {
return
}