X

Create New Item

File Folder

X

Search Results

File "EnsureDynamicContentIsHighlighted.php"

Full path: /home/orbitecv/orbite-school.orbit.et/vendor/laravel/framework/src/Illuminate/Console/View/Components/Mutators/EnsureDynamicContentIsHighlighted.php
File size: 381 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Edit   Back

<?php

namespace Illuminate\Console\View\Components\Mutators;

class EnsureDynamicContentIsHighlighted
{
    /**
     * Highlight dynamic content within the given string.
     *
     * @param  string  $string
     * @return string
     */
    public function __invoke($string)
    {
        return preg_replace('/\[([^\]]+)\]/', '<options=bold>[$1]</>', (string) $string);
    }
}