Skip to content

PHP code seems to be insufficiently tagged. #98

@ShawnMcCool

Description

@ShawnMcCool
echo $this->highlighter
    ->highlight(
        'php',
        <<<'CODE'
        <?php
        
        $high = $dog->cat();
        $dog = new Cat();
        CODE
    )
    ->value;

This code echos:

<span class="hljs-meta">&lt;?php</span>

$high = $dog-&gt;cat();
$dog = <span class="hljs-keyword">new</span> Cat();

Is there something that I'm doing wrong that prevents.. for example.. the class name to be wrapped in a span? Only the 'new' keyword and '<?php' meta seems to be specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions