Skip to content

Error in php syntax highlight #178

@oleg-dk

Description

@oleg-dk

It seems, there is error in php highlight in pattern dot–single-quote «.'»
eg.:
https://i.imgur.com/vy1UaEf.png

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

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

or
https://i.imgur.com/uKAgvN1.png

//title: grep search

$searchString = 'media-army';# поисковая фраза
$searchPath = 'bitrix/templates';# папка поиска относительно корня сайта

$searchPath = realpath(realpath($_SERVER['DOCUMENT_ROOT']).'/'.$searchPath);
$exec = 'grep -rn "'.$searchString.'" '.$searchPath;
echo $exec, PHP_EOL, PHP_EOL;

if (is_string($searchPath) && 0 < strlen($searchPath)) {
    exec($exec, $out);
    echo 'Результат:', PHP_EOL, var_export($out, true), PHP_EOL;
} else {
    echo 'Ошибка: неверный путь', PHP_EOL;
}

Issue noticed in EnlighterJS Syntax Highlighter 3.4.0. Updated to the latest 3.5.0 from github, still have issue.

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