highlight_auto - Twig Filter
This Twig filter creates server-side syntax highlighting of the given code via
highlight.php. It works the same way as the
highlight filter, except the programming language will be auto-detected.
Optionally you can pass an array of allowed program languages for the auto-detection as an argument.
Note: the filter returns a Contao\CoreBundle\Twig\Runtime\HighlightResult instance, which is just a thin wrapper for
Highlight\HighlightResult, adding a __toString() method, so that you can also use {{ highlighted|raw }}.