From: Tim Düsterhus Date: Tue, 15 Sep 2020 13:01:58 +0000 (+0200) Subject: Add csharp to highlighter guessing X-Git-Tag: 5.3.0_Beta_1~24^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bb4a8275edd8749dcc00a60de3dc41b74ba45329;p=GitHub%2FWoltLab%2FWCF.git Add csharp to highlighter guessing --- diff --git a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodePre.class.php b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodePre.class.php index 8a6f8b46ad..a52bf92757 100644 --- a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodePre.class.php +++ b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodePre.class.php @@ -173,6 +173,10 @@ class HtmlOutputNodePre extends AbstractHtmlOutputNode { return 'java'; } + if (mb_strpos($content, 'using System;') !== false) { + return 'csharp'; + } + if ( mb_strpos($content, "---") !== false && mb_strpos($content, "\n+++") !== false) { return 'diff';