Page MenuHomePhabricator

How to get syntaxic highlighting on .phtml files ?
Closed, ResolvedPublic

Asked by benjamin.cohen-solal on Dec 19 2013, 5:27 PM.

Details

I would have to get the syntaxic highlighting on phtml files (the html part highlighted as html and the php part as php).
Sample of phtml file :

<html>
  <body>
    <?php echo "Hello World !" ?>
  </body>
</html>

Answers

epriestley
Updated 4,677 Days Ago

Neither libphutil nor Pygments provide a highlighter which supports this, as far as I know, so there's currently no way to do it. The lexer in libphutil (PhutilPHPFragmentLexer) could be extended to handle it, but this is pretty complicated.

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.