Skip to content

Commit 9995a01

Browse files
committed
Fix: Display Python files as plain text without HTML rendering
- Python files now display as raw text using textContent instead of HTML rendering - Removes any syntax highlighting or HTML formatting for Python files - Shows the exact content as stored in the file
1 parent b8b8057 commit 9995a01

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

docs/app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ async function loadFile(path, meta = {}) {
201201
markdownContent.classList.remove("hidden");
202202
imageContent.classList.add("hidden");
203203
codeContainer.classList.add("hidden");
204+
} else if (languageClass === "python") {
205+
// For Python files, display as plain text without rendering
206+
markdownContent.classList.add("hidden");
207+
imageContent.classList.add("hidden");
208+
codeContainer.classList.remove("hidden");
209+
codeBlock.textContent = text;
204210
} else if (languageClass === "json") {
205211
let formatted = text;
206212
try {

0 commit comments

Comments
 (0)