PrismJS / prism

Lightweight, robust, elegant syntax highlighting.
https://prismjs.com
MIT License
12.33k stars 1.29k forks source link

HTTP body no longer highlighted based on Content-Type header. #3780

Open maa-x opened 8 months ago

maa-x commented 8 months ago

Information

Description HTTP messages should use the correct highlighter for the body based on the Content-Type, as per documentation and example ("Response body highlighted based on Content-Type"). It's broken in the example shown below to demonstrate that feature.

Code snippet

Test page

content-length: 22
content-type: text/html

<html>Some Html</html>

In that example, <html>Some Html</html> should be highlighted as HTML and not plain-text.