Is there an lang-delphi.js file on the Internet for Delphi posting on Prettify? Or you can somehow change lang-pascal.js so that it works correctly? At the moment, he doesn’t want to work normally - all words starting with a capital letter mark the class typ .
prettyPrint(); .str { color: #060 } .kwd { color: #006; font-weight: bold } .com { color: #600; font-style: italic } .typ { color: red; font-weight: bold } .lit { color: #044 } .pun, .opn, .clo { color: #440 } .tag { color: #006; font-weight: bold } .atn { color: #404 } .atv { color: #060 } <pre class="prettyprint"> Function FunctionName(Param: Type): Result; Begin End; function functionname(param: type): result; begin end; FUNCTION FunctionName BEGIN END; </pre> As you can see, none of the options are highlighted correctly. The whole essence of the problem is visible in the first version - all words beginning with a capital letter are colored red (marked with the typ class), but this should not be. The second option is the most acceptable, but you need the opportunity to start the names of variables and functions with a capital letter - this is often used in Delphi.
Also, keywords (for example, Function ) should ideally be case-insensitive.