Skip to content

Allow PHP syntax highlighting without open tag

The PHP lexer for Pygments normally requires PHP code to start with <?php. It has, however, an option to allow this open tag to be omitted. This option (startinline) is only recognized by the PHP lexer and has no drawbacks because mixing HTML and PHP is deprecated anyway and for cases where you really want to have it, there is an html+php lexer. Therefore it has been determined that this option can always be enabled. Before After

Merge request reports