Add JSON language check

This commit is contained in:
Gregory Schier
2025-05-30 10:02:43 -07:00
parent 4166daf0a2
commit a7a301ceba

View File

@@ -117,7 +117,7 @@ export function TextViewer({ language, text, responseId, requestId, pretty, clas
}
// Decode unicode sequences in the text to readable characters
if (pretty) {
if (language === 'json' && pretty) {
body = decodeUnicodeLiterals(body);
body = body.replace(/\\\//g, '/'); // Hide unnecessary escaping of '/' by some older frameworks
}