Automatically detect HTTP codeblocks
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 17 Jan 2023 13:07:33 +0000 (14:07 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 17 Jan 2023 13:07:33 +0000 (14:07 +0100)
wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodePre.class.php

index b2018b9a016a0622a1a9080637d529279958cf94..530d593600d6b976656394bb6e81da8971e097a9 100644 (file)
@@ -263,6 +263,10 @@ class HtmlOutputNodePre extends AbstractHtmlOutputNode
             return 'css';
         }
 
+        if (\preg_match('/(^|\n)HTTP\\/[0-9]\\.[0-9] [0-9]{3}/', $content)) {
+            return 'http';
+        }
+
         return '';
     }