Skip to content

Wrong method highlight in php if it is named «do». #181

@oleg-dk

Description

@oleg-dk

Wrong method highlight in php if it is named «do».
E.g. in code

public static function customAgent()
{
    if (self::setDocumentRoot() === false) {
        self::log('fail to set document root', ['type' => 'error']);
        return '\\'.__METHOD__.'("errUnknownDocRoot");';
    }

    $result = self::do('customAgent');
    $result = self::parseResult($result);
    self::emulatePeriodical();
    return '\\'.__METHOD__.'('.($result ? $result : '').');';
}

screenshot: https://i.imgur.com/fDdQvpq.png

It seems that it highlight as reserved word, but not a method.

EnlighterJS Syntax Highlighter 3.5.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions